how to pass large data to web workers
问题 I am working on web workers and I am passing large amount of data to web worker, which takes a lot of time. I want to know the efficient way to send the data. I have tried the following code: var worker = new Worker('js2.js'); worker.postMessage( buffer,[ buffer]); worker.postMessage(obj,[obj.mat2]); if (buffer.byteLength) { alert('Transferables are not supported in your browser!'); } 回答1: UPDATE : According to Mozilla the SharedArrayBuffer has been disabled in all major browsers, thus the