Hacker News new | ask | show | jobs
by axemclion 3486 days ago
There are a bunch of other complexities too - things like

(1) cancelling events which are synchronous, but web worker communication is async

(2) What is the best serialization format ? I found JSON.stringify to be the fastest, but how to compress data better ?

(3) How to batch the operations when you want to send info over from worker to the UI thread. The batch size should be small enough that it runs in 16ms, but large enough that you don't waste frame cycles.

(4) Figuring out if it makes sense to spawn multiple workers to diff parts of the VDOM tree - similar to React Fiber