Thanks for the tip! I did indeed move to generating the patterns at startup, rather than on the first frame of each transition, and that helped.
I also optimised the inner drawing loop from:
each pos in xs join ys
# grab the strip from the old screen, starting at the top
strip:a.copy[pos[0],0 stripwidth,stripheight]
# Draw the strip at the target position
c.paste[strip pos]
end
…down to this:
stripsize:stripwidth,stripheight
topfactor:1,0 # pos*topfactor = pos[0],0
paste:c.paste
copy:a.copy
each pos in xs join ys
paste[copy[pos*topfactor stripsize] pos]
end
For 256 strips, that brought the total op count from ~6000 down to ~4000, so I could paint 512 strips and stay within the operation quota for a transition frame. Of course, then I start pushing against lower-level performance limits… but I’m happy to stop there.


