I have a web worker (started with new Worker() ) that does some processing and should return a Float32Array .
However, it seems that after working postMessage() data, it goes through serialization and deserialization in JSON, and as a result I get a message, this is a simple javascript Array (with all the properties that the original typed array had)
The trivial job should be to simply restore the typed array from the javascript array, but this is wasteful and takes time and memory.
Is there a better way to do this? Some way to describe JSON deserialization to create a Float32Array instead of a javascript array? or a way to transfer binary data in another way?
source share