dodrio icon indicating copy to clipboard operation
dodrio copied to clipboard

Dodrio in web worker

Open olanod opened this issue 6 years ago • 1 comments

Would it be feasible to make Dodrio run in a web worker by doing the diffing and everything else in the worker and only applying the change list in the main thread? perhaps the bridging can use a SharedArrayBuffer if available or some efficient serialization mechanism also used to bridge user evens :thinking:

olanod avatar Jan 25 '20 10:01 olanod

you need to keep in mind the cost of serialization and deserialization in general that is possible but it would need some more logic. An Implementation that would sync the whole dom tree would be slow probably at scale.

I have found only one Algo that would work in that scenario but it is highly experimental research.

I hook into the MutationObserver for the DOM and sync that Batched Changes to WASM which gets on Init the Intal dom + changes.

frank-dspeed avatar Mar 19 '20 04:03 frank-dspeed