Using transferable objects from a Web Worker
The answer given by sbr works, but it would cause a copy of the data to be made before being sent to the worker. That could be slow for a large amount of data. To use “transferable objects” you actually transfer the ownership of the object to or from the web worker. It’s like passing … Read more