I am using web workers to do intensive computer vision stuff. How it works is in the web worker, I call post message to send data to the parent, but it gets called a lot of times in high frequency (thousands). Currently the program runs slow too. I used chrome dev tools to profile the js usage, and I got this:
Does anyone know what this means. I think the post message is maybe taking the longest. Would it be faster if I collect all the data and then send back the full batch at once with 1 postmessage?