Re:Chrome will aggressively throttle background tabs
by MisterKent on Tuesday January 24, 2017 @02:07PM
(#13474432)
Except it should probably be web workers that are unthrottled. However, in the current implementation Web workers do get throttled. Service workers are supposed to be for networking and offline applications, not doing cpu related things. As such, service worker lifetimes are really messy since they don't have real guarantees as to if they will randomly restart.
Re:Chrome will aggressively throttle background tabs
by Oblouk on Tuesday January 24, 2017 @03:14PM
(#13475031)
I am having a hard time finding where it states that web workers are treated the same as threads managing visual content. Currently timers in background threads are throttled to 1sec minimum interval however workers are not bound by this constraint. I may just be missing something, but I sure hope not. This would adversely impact many games and applications rendering many of them unusable without the web worker exclusion.
This seems like a step towards the way things work with mobile apps currently, where the app's main thread gets suspended when its not in the foreground, and background processing happens in separate threads which the user has some degree of control over.
Edit: I meant regular `Worker`s, not `ServiceWorker`s.
[1]: https://developer.mozilla.org/en-US/docs/Web/API/Worker