News for hackers. Stuff that matters.
Re:Chrome will aggressively throttle background tabs by lucb1e on Tuesday January 24, 2017 @11:09AM (#13472475)
I like the change as a general idea but there obviously needs to be a manual override. Like, I don't want websites to access my camera without permission but obviously I want to allow some websites to do that. A similar permission could be used here and is perfectly backwards compatible:

1. a tab exceeds its quota and throttling kicks in;

2. you visit the tab to check why it stopped working;

3. you get a permission pop up (like all others) once you visit the tab again, asking you whether you want to allow it unlimited resource usage, noting that it'll decrease battery life of your device.

Re:Chrome will aggressively throttle background tabs by jklinger410 on Tuesday January 24, 2017 @11:45AM (#13472954)
Pinned tabs would be an easy solution for this.

"Don't throttle pinned tabs"

Re:Chrome will aggressively throttle background tabs by koheripbal on Tuesday January 24, 2017 @11:54AM (#13473045)
A common use-case is tabs that are streaming music. I'm not sure if most users are even aware of pinned tabs.
Re:Chrome will aggressively throttle background tabs by tyingq on Tuesday January 24, 2017 @12:10PM (#13473232)
They are making an exception for tabs that are playing audio.

You can see the discussion back and forth, here: https://groups.google.com/a/chromium.org/forum/#!topic/blink...

I can see where that will end up though. Everyone who's app was broken by this change will start playing zero volume audio, then the exception will be yanked back.

With the web poised to be the new platform for applications, there really needs to be some more thought put into how to accomplish that goal. The chrome devs already sunset some solutions in that space, like the HTML5 app cache. Now this. Nobody likes a constantly moving target.

Re:Chrome will aggressively throttle background tabs by bluGill on Tuesday January 24, 2017 @01:32PM (#13474092)
No tab should get the audio exception unless it started playing audio while I was looking at it. (reopen yesterdays tabs counts as looking at it...) If you play audio to get around throttling - you should get zero CPU, not just throttled. If you have work to do in the background that is fine - there is legitimate work to do. However once you are playing audio it must mean the other work is done.

What do I know though? I don't normally listen to audio on the web...

Re:Chrome will aggressively throttle background tabs by tyingq on Tuesday January 24, 2017 @01:36PM (#13474130)
I think they are somewhat stuck with conflicting goals. Online games, for example, play audio while doing other work. But it's probably reasonable to pause everything, including the audio, if you move away from the tab.

On the other hand, if they are using Pandora or similar, the end user probably wants the background tab playing and doing other work (showing current album cover art or whatever so it's there if you switch back to that tab).

Re:Chrome will aggressively throttle background tabs by chowyuncat on Tuesday January 24, 2017 @03:13PM (#13475025)
allow_exception = volume < audible_threshold
Re:Chrome will aggressively throttle background tabs by ec109685 on Tuesday January 24, 2017 @11:50PM (#13478627)
Super high pitch noise would get through?
Re:Chrome will aggressively throttle background tabs by kakarot on Tuesday January 24, 2017 @12:31PM (#13473465)
I use pinned tabs extensively and I prefer that they are throttled even more aggressively than standard open tabs. As long as streaming doesn't break.

I have an option set in FF's about:config that disables loading of my pinned tabs on startup, so I regularly keep 200-300 tabs open and only activate the ones I need.

Sometimes it takes weeks to clear my tabs because I barely see a performance hit from having so many open.

Re:Chrome will aggressively throttle background tabs by jklinger410 on Tuesday January 24, 2017 @01:41PM (#13474179)
Unfortunately this doesn't seem to be the way most users are using pinned tabs. Check out the great suspender. The only tabs it does not freeze are the pinned tabs.

Extending that functionality to throttling seems natural to me.

Re:Chrome will aggressively throttle background tabs by kakarot on Tuesday January 24, 2017 @11:57PM (#13478660)
It looks cool. Browser memory isn't too much of an issue for me because I run NoScript and uMatrix and thus most of the tabs I have open aren't each running an instance of Google Analytics and stuff like that.
Re:Chrome will aggressively throttle background tabs by criswell on Tuesday January 24, 2017 @12:25PM (#13473384)
It still drives me nuts there's no keyboard shortcut for it. `Command + Shift + P` would be sweeeeeeet.
Re:Chrome will aggressively throttle background tabs by evv on Tuesday January 24, 2017 @01:22PM (#13473992)
It is silly to need an extension for this, but I don't know what I would do without `Command + Shift + X`

https://chrome.google.com/webstore/detail/tab-pinner-keyboar...

Re:Chrome will aggressively throttle background tabs by criswell on Tuesday January 24, 2017 @07:42PM (#13477330)
Awesome. Thanks!
Re:Chrome will aggressively throttle background tabs by CamelCaseName on Tuesday January 24, 2017 @12:03PM (#13473142)
I was not, what a great feature!
Re:Chrome will aggressively throttle background tabs by philsnow on Tuesday January 24, 2017 @12:10PM (#13473220)
didn't they remove pinned tabs a while back, and then re-add them?
Re:Chrome will aggressively throttle background tabs by rdsubhas on Tuesday January 24, 2017 @11:54AM (#13473049)
While this is elegant, its still dangerous. There are online payments that could check whether your booking is complete in the background by periodically firing ajax calls, bulk updates or uploads, etc.
Re:Chrome will aggressively throttle background tabs by tene on Wednesday January 25, 2017 @03:20PM (#13485608)
If those sites are using more than 10% of a CPU to do it, then they've made a catastrophic error, and I'd be glad for Chrome to protect my battery from that.
Re:Chrome will aggressively throttle background tabs by rhizome on Tuesday January 24, 2017 @12:30PM (#13473450)
The business decisions a website makes are none of my business, and if they want to use a polling model for billing because $REASONS then that's their problem.
Re:Chrome will aggressively throttle background tabs by Kiro on Tuesday January 24, 2017 @12:42PM (#13473562)
How is that relevant to throttling?
Re:Chrome will aggressively throttle background tabs by ozataman on Tuesday January 24, 2017 @06:06PM (#13476644)
I don't want to have to pin every single tab I want unthrottled - that's a mixing/piggybacking of otherwise orthogonal concerns. Just make it a separate option I can set per tab.
Re:Chrome will aggressively throttle background tabs by Bartweiss on Tuesday January 24, 2017 @11:17AM (#13472579)
This would be great. At the very least, I'd like the power to un-throttle a tab myself if I decide to do so - even if there's no prompt, it's important to me that I can let a process run full-speed in the background. Losing that would actually decrease the value of Chrome quite a bit for me.
Re:Chrome will aggressively throttle background tabs by Brakenshire on Tuesday January 24, 2017 @11:18AM (#13472590)
It could also be a permission granted to a Progressive Web App once the user has decided to install it.
Re:Chrome will aggressively throttle background tabs by josu on Tuesday January 24, 2017 @11:24AM (#13472688)
Or just ask for the permission when you first open the page, the same way uber asks for your location.

www.foobar.com wants to:

"Run in the background unthrottled"

Re:Chrome will aggressively throttle background tabs by windlep on Tuesday January 24, 2017 @11:38AM (#13472862)
The amount of people that will understand what that means is not very substantial. Usually asking for more permissions confuses users as well, people get permission fatigue.
Re:Chrome will aggressively throttle background tabs by woodrowbarlow on Tuesday January 24, 2017 @11:40AM (#13472878)
i don't think that would work.

request for location doesn't require the page to explicitly indicate a desire, the request is triggered if the page attempts to use the location services of the JS API. sites that want to run unthrottled can't be identified simply by the usage of a certain API, so the developer would need to add something explicitly to their markup to indicate the desire.

i want control over the feature regardless of whether or not the site's developer deems it appropriate.

Re:Chrome will aggressively throttle background tabs by loco5niner on Tuesday January 24, 2017 @11:37AM (#13472848)
I really don't want EVERY website I visit to do this (at least in a pop up).
Re:Chrome will aggressively throttle background tabs by pmiller2 on Tuesday January 24, 2017 @11:38AM (#13472863)
That's less "backward compatible" than the suggestion to pop up a dialog on switching to the page, because the page needs to know to ask for the permission.

I'm not sure if that's a good thing or a bad thing. After all, backward compatibility is how we got the semantics of an alert() dialog stopping all JS execution.

Re:Chrome will aggressively throttle background tabs by rhizome on Tuesday January 24, 2017 @12:35PM (#13473490)
These days, due to my annoyance with pages reloading themselves when switching to a tab, I'm really not interested in packing more functionality into the whole tab switching mechanism. Like the back button, it should not be visible to web developers.
Re:Chrome will aggressively throttle background tabs by codedokode on Tuesday January 24, 2017 @07:13PM (#13477137)
Every website would start showing such popup. Now (if you have enabled Javascript) many sites show popup to allow notifications the moment you open them. That is annoying when you search for something in Google and have to click "No" for every new page opened.
Re:Chrome will aggressively throttle background tabs by Ajedi32 on Tuesday January 24, 2017 @12:52PM (#13473669)
Seems like the current solution they're advocating for is for sites to do background processing in a [Worker][1].

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

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.
Re:Chrome will aggressively throttle background tabs by Ajedi32 on Tuesday January 24, 2017 @02:18PM (#13474540)
Yeah, sorry. I keep conflating service workers with the larger concept of web workers. For more intensive tasks you'd definitely use a regular dedicated worker, not a service worker.
Re:Chrome will aggressively throttle background tabs by fixermark on Tuesday January 24, 2017 @02:03PM (#13474397)
Far enough down this road, we're just reimplementing 'renice'.

... which may actually be the right solution.

Re:Chrome will aggressively throttle background tabs by NTripleOne on Tuesday January 24, 2017 @12:15PM (#13473292)
>3.

I swear to god if I see anything mentioning a battery on a desktop machine with no battery...

Re:Chrome will aggressively throttle background tabs by jrockway on Tuesday January 24, 2017 @12:18PM (#13473328)
There's no way to know whether or not it has a battery. Maybe it's on a UPS, for example.

All I know is that my desktop runs at about 70W idle vs. 450W fully-loaded. Unnecessary use of the CPU wastes money regardless of whether or not you're using that money to charge a battery.

Re:Chrome will aggressively throttle background tabs by jlgaddis on Tuesday January 24, 2017 @08:43PM (#13477691)
Sites can get your battery level from the browser.

IIRC, most of the browsers are going to do away with this functionality soon, however.

Re:Chrome will aggressively throttle background tabs by cbhl on Tuesday January 24, 2017 @12:45PM (#13473591)
Even on a desktop machine, you don't want tabs spinning in the background (using electricity) if you don't need the work being done. That's bad for your wallet and bad for the environment.