3 ms·
> you might be better off just offloading that optimized synchronous op to a worker thread (or to wasm) to not block the UI. It works in principle, but note th
by fenomas 2y ago
> you might be better off just offloading that optimized synchronous op to a worker thread (or to wasm) to not block the UI.
It works in principle, but note that this really complicates your build process. In particular, if you're writing a library that other people will use as a dependency, there's really no good way to use workers at all without affecting how people bundle their code using your library.
- adregan 2y agoThe library use case is trickier, but bundlers do a pretty good job of handling workers (albeit with funky magic comments in webpack’s case). What I find a pain is the uneven support for shared workers.