4 ms·
Snappy UIs with WebAssembly and Web Workers
- chrisjj 3y ago> If we were to just call the compute function inside of our Svelte front-end, we would run it in the main thread and lock up the UI, causing a bad user experience as the webpage would appear frozen. To fix this, we run that code inside of a Web Worker. Doing this will allow us to run the search algorithm in a separate thread so the main thread is available to respond to the user. I can't see what useful response to the user is possible, given the search results are as yet unavailable.
- chrisjj 3y ago> While the Wasm binary is faster than a JavaScript implementation would be Is this still true? JS JIT compile and all...
- chrisjj 3y agoGreat idea, but I am having difficulty with this UI, despite being very much in target audience having done much loop editing in direct waveform editors. Let me know if you'd like feedback here.