4 ms·
You start by building your knowledge around computer graphics and modern web development, basically WebGL and modern web APIs have made doing sophisticated grap
by suyash 2y ago
You start by building your knowledge around computer graphics and modern web development, basically WebGL and modern web APIs have made doing sophisticated graphic applications on the browser. Only limitation right now I see is single threaded limitation on the browser.
- ptsd_dalmatian 2y agoWhat about workers? Isn’t it basically the same as offloading computation heavy work to separate thread? Also, we have WebAssembly. Afaik, js threads can now share memory using SharedArrayBuffers. So I don’t think we have this single thread limitation anymore :)
- noduerme 2y agoIdk about this specific app, but 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. I imagine for huge video files, having each worker load up a separate copy could be a bottleneck.
- LoganDark 2y 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/Reference/Global_Objects/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 https://github.com/nagadomi/nunif/issues/34
- noduerme 2y agoOoh. 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.
- clementpiki 2y agoIndeed, Pikimov is using SharedArrayBuffers to decode video frames outside of the main thread