3 ms·
You could toss the expensive function in a web worker to make it non blocking.
by dvlsg 8y ago
You could toss the expensive function in a web worker to make it non blocking.
- Waterluvian 8y agoToo expensive to do in one frame. Too cheap to use a worker. Alas. :)
- Klathmon 8y agoDepending on the data you are sending transferrable objects could be your solution. Typed arrays can be zero-copy transferred to a worker extremely quickly, modified, then transferred back if needed. No costly copying or cloning needed. But it won't work with just objects, just typed arrays.