ScratchData LogoScratchData
Back to TheLogFather's profile

SPD: nested expressions are Bad (Scratch 2 only)

THTheLogFather•Created May 14, 2016
SPD: nested expressions are Bad (Scratch 2 only)
129
78
4062 views
View on Scratch

Description

==================================== NOTE: This project is not relevant in Scratch 3. – it was only an issue in Scratch 2. Also, the timer block is broken in Scratch 3 during non-refresh, so the time often ends up zero anyway... :/ ==================================== Been meaning to make a speedtest for this for some time now. It's something to remember if you have complicated calculations at various points in your project, that are being done lots of times in each frame. If you have highly nested expressions then it's worth thinking if you can re-order the operators to do it in a way that's not so nested. The reason this happens is to do with the way Scratch checks for blocking conditions for extensions: https://github.com/LLK/scratch-flash/issues/793 I made a first attempt at a patch for this a long time ago: https://github.com/LLK/scratch-flash/pull/795 Applying that patch not only makes both scripts take about the same time, but even cuts it down to half the top script's current time!

Project Details

Project ID109683095
CreatedMay 14, 2016
Last ModifiedNovember 19, 2022
SharedMay 14, 2016
Visibilityvisible
CommentsAllowed