scribble.rs
scribble.rs copied to clipboard
Speed up flood fill using wasm
While b72abbd6ea1b1aab9108b4ab2b8c6798ca807805 and 8e2d3a7e6a6c4df5099d95c8040c8bf3c7683102 made this slightly less relevant, it would still be very nice to reduce the floodfill action to something like 10-30ms instead of 50-60ms.
If possible, the code that compiles into WASM should be golang or we translate the current JS implementation into WASM.
I just want to note here that while go could be compiled to wasm, it might produce large file sizes due to the whole runtime being included.
Maybe it would be better to use another language.
Yeah, I've seen something called AssemblyScript I think. Seemed like it might be a good idea. Alternatively one could use C I guess 🤷
The floodfill performance has already been improved, currently I don't think putting the effort into this would be worth it.