4 ms·
Do service workers continue running?
by foota 6y ago
Do service workers continue running?
- Aardwolf 6y agoDidn't test (yet), but if they do, then what's the point of throttling background tabs?
- simcop2387 6y agoService workers have restrictions on what they can do. They can't interact with thr dom and a few other things to keep them from causing rendering or other changes.
- chhamilton 6y ago(Chromium dev here.) We don't throttle workers (that could change, but we don't have firm plans here yet). All things being equal, if you move complex work to workers we're happy because it frees up the main thread to handle input events, compositing, etc. Just because your tab is in the background doesn't mean your renderer process isn't sharing a main thread with a tab that is in the foreground, so in this case it can improve foreground tab performance. Also, spreading a fixed amount of work across more cores and fewer wake-ups is actually more efficient from a power point of view (assuming the wake-ups are synchronized).
- chhamilton 6y ago(Chromium dev here.) Yes, for now all workers continue to run unthrottled (shared, dedicated and service). They may also be throttled at some point, but we have no firm plans around this yet.