Very interesting approach. I do prefer webworkers, but they can't access the DOM. This is a good alternative, when from your worker function you need to call a library that reads/writes the DOM.
Indeed webworkers are good solution for most of use-cases and I have used them way more often then this approach.
I haven't yet benchmark it yet (I hope I have time to do it), but passing data to the webworker and back adds some overhead. Depending on the type and amount of data that overhead might take a toll in time to execute and memory usage.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Very interesting approach. I do prefer webworkers, but they can't access the DOM. This is a good alternative, when from your worker function you need to call a library that reads/writes the DOM.
Indeed webworkers are good solution for most of use-cases and I have used them way more often then this approach.
I haven't yet benchmark it yet (I hope I have time to do it), but passing data to the webworker and back adds some overhead. Depending on the type and amount of data that overhead might take a toll in time to execute and memory usage.