DEV Community

Discussion on: Search as you type at 60fps with js-coroutines

Collapse
 
mungojam profile image
Mark Adamson

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

Collapse
 
miketalbot profile image
Mike Talbot ⭐

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.