Closed turbobuilt closed 5 months ago
Hi @turbobuilt,
That is to be expected as the code will be running on the main thread and will overwhelm the event loop and halt everything until it completes.
We can use WebWorkers to offload that work.
I've created an example app showing how to use WebWorkers at https://github.com/jamsinclair/jSquash/tree/main/examples/web-workers. You can see how the work is split between the following two files and how messages are passed between the workers:
If you're using Vite, please also note the Vite config required for workers.
I hope that helps!
Whoops, my bad!
Describe the bug My page freezes when this is going. Is there a way to make this run on a background thread? I'm using the vite version.
Edit: just switched to the regular, and it still freezes (the spinner stops spinning) while converting
To Reproduce Steps to reproduce the behavior: just use it as usual