Closed pwouik closed 9 months ago
turbowarp don't dramatically improve pure pen performance
Show me an example project to compare TurboWarp (compiler disabled) and Scratch. We do.
Pen lines are WebGL, not canvas 2d, so your example's results are not directly meaningful.
You are correct that Scratch does one draw-call per pen line and that buffering them up into groups would be faster, which is why we already do that
oh nice, I also thought of webgl but I wasn't sure you could have enough parity with scratch I used this project: https://scratch.mit.edu/projects/441947766/
turbowarp don't dramatically improve pure pen performance A factor is that scratch use one path per line, instead of just one path My testing in javascript show that a continuous path is 7~8x faster
An idea would be to batch paths of the same style per frame, using Path2D to store them and moveTo to jump from one to another line the batch would need to be flushed before using sensors and erase all (and once per frame)