Hacker News new | ask | show | jobs
by LoganDark 717 days ago
> the main problem with workers is that any data their working on needs to be copied in or side-loaded into them once they spin up

Isn't this no longer an issue thanks to SharedArrayBuffer?

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

I believe the ONNX Runtime uses this for multithreading on the web, see https://github.com/nagadomi/nunif/issues/34

1 comments

Ooh. Interesting. I wrote my last worker-based app a couple years ago for chunking and crunching some large datasets. I'll have to give this a go one weekend.
Indeed, Pikimov is using SharedArrayBuffers to decode video frames outside of the main thread