How come there isn't more focus on using another thread via web workers in JS?
I've come across from using other languages where kicking off jobs in another thread is pretty simple and so I don't understand why it seems to be so niche in the web world. Is it just about browser compatibility?
Hey, totally use another thread when it makes sense. I do. However, moving stuff around in JS is difficult due to the sandboxing. So for instance in my code I do nearly all my processing on a worker thread that can get the data from an IndexedDb database - however, there's a lot of cases where you aren't in your "core" code and then this stuff helps a lot to avoid a glitch.
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.
How come there isn't more focus on using another thread via web workers in JS?
I've come across from using other languages where kicking off jobs in another thread is pretty simple and so I don't understand why it seems to be so niche in the web world. Is it just about browser compatibility?
Super article though, I'll give this a go later
Hey, totally use another thread when it makes sense. I do. However, moving stuff around in JS is difficult due to the sandboxing. So for instance in my code I do nearly all my processing on a worker thread that can get the data from an IndexedDb database - however, there's a lot of cases where you aren't in your "core" code and then this stuff helps a lot to avoid a glitch.