14 ms·
> What I know I care a lot about is when a tab I haven't looked at in three days is suddenly using CPU time _at all_. Just make it so background tabs get severe
by jefftk 8y ago
> What I know I care a lot about is when a tab I haven't looked at in three days is suddenly using CPU time _at all_. Just make it so background tabs get severely limited in their ability to do background execution and eventually get stopped entirely, and the problem is essentially solved.
Chrome does throttle background tabs: https://developers.google.com/web/updates/2017/03/background_tabs https://developers.google.com/web/updates/2017/03/background...
It doesn't throttle them all the way to zero, though. If they did that they'd break things like sites that change their favicon to signal "unread message".
(Disclosure: I work at Google, though not on Chrome)
- realusername 8y agoFirefox has also the same logic to throttle background tabs.
- tokyodude 8y agoyes. without background processing every web based service that has live updates would break. Email (Gmail/outlook.com/...) chat (slack/messenger/WhatsApp/Discord) SNS (fb/Twitter) even stack overflow and github have various forms of live update
- int_19h 8y agoOn mobile platforms, app don't use polling loops for that sort of stuff, precisely so that power usage could be optimized. Time for something similar for the web?
- omnimus 8y agoArent notifications same thing with only difference that they go through apple/google centralized server so your phone doesnt have to listen for multiple servers but just one?
- crooked-v 8y agoA simple short-term workaround would a setInterval equivalent that can be set to "every so often" instead of a hard number, leaving it up to the browser or OS to coalesce updates into chunks of activity every so often.
- ehavener 8y agobackground connections !== polling loops Many services use an open tcp connection (e.g. websocket) rather than polling. Mobile platforms are doing the same thing, just on a system level. I guess service workers are the closest web analogue.