tldr; remove when a pressed
block for 2x speed, maybe also clean up all the random blocks thrown about, scroll down for project link
finding performance issues
this probably isn't the usual way people do it and it's not particularly easy but i like to use the browser's built in flame graph for finding performance issues. firefox has a nice performance tab in its devtools that generates an excellent flame graph. if you decide to use it yourself, make sure to close and open the devtools on the performance tab before you start recording. many other tabs seem to put the browser in some kind of debugging mode that makes everything run much slower.
about 30% of the time spent running the project is just on finding, starting, and stopping hat blocks. i'm not too familiar with it, but notably it looks like searching through, starting, and stopping scripts is taking a while.
optimizing
first thing i did was removed all the unused blocks. snap can go through all the scripts for hat blocks faster if you get rid of all the script without hats. only about a 2% improvement.
next thing i did was remove the when a pressed
from tile, and replaced it with a waiting loop tacked onto the existing flag block
this stopped all the hat block checking entirely, and the project is nearly twice as fast.
i'm not happy with the performance still so i'm going to keep messing with it but i figure this is enough of a difference that you'd want it now:
i'll probably make more posts with better performance changes later
other
on another note, are you using empty loops to wait out frames? i'm seeing them all over the place, and plenty of WAIT 0 SECS blocks.
i don't know the specifics of the new quicksteps update (when exactly it does or doesn't run loops fast), but that might've broken these?