Slashdot Mirror


Chrome To Introduce Timer To Throttle Background Pages (ghacks.net)

Google plans to roll out a change in Chrome Stable soon that will have the browser throttle timers in background tabs to improve battery life and browsing performance. From a report: The motivation behind the chance is that some pages consume a lot of CPU when they are in the background. Google mentions JavaScript advertisements and analytics scripts explicitly but it is not limited to that. The core idea is to limit the processing power that background tabs get in Chrome once the feature lands. (1) Each WebView has a budget (in seconds) for running timers in background. (2) A timer task is only allowed to run when the budget is non-negative. (3) After a timer has executed, its run time is subtracted from the budget. (4) The budget regenerates with time (at rate of 0.01 seconds per second). (5) The only pages that appear to be exempt from the throttling are those that play audio.

122 comments

  1. Easy by Anonymous Coward · · Score: 3

    I guess we'll be seeing a lot more pages that play audio soon.

    1. Re:Easy by arth1 · · Score: 1

      Indeed.

      Why not have a checkbox on every tab that defaults to off, and which dictates whether the page updates at all when the tab is inactive?
      Almost all tab use is, unfortunately, a lazy substitute for bookmarking, of pages that don't need to update when not viewed.

    2. Re:Easy by Anonymous Coward · · Score: 1

      "Almost all tab use is, unfortunately, a lazy substitute for bookmarking, of pages that don't need to update when not viewed."

      Speak for yourself. Code reviews - one tab per file, close each tab as the file is reviewed = more efficient. Evaluating product pricing across shop sites - more efficient to keep each shop in a tab and flip between them. Research - each link in a wikipedia page can be opened in a tab and read in sequence.

    3. Re:Easy by Anonymous Coward · · Score: 1

      Indeed.

      Why not have a checkbox on every tab that defaults to off, and which dictates whether the page updates at all when the tab is inactive?
      Almost all tab use is, unfortunately, a lazy substitute for bookmarking, of pages that don't need to update when not viewed.

      No.
      Bookmarks do not (and are not meant to) keep track of what I'm doing on a page. If I read half an article, switch tabs, then switch back, I'm right at the same place I left off. If I had to log into a site, I'm still logged in. If I've typed in part of a reply or comment on a site like slashdot, what I've typed is still there.
      Bookmarks do not preserve the state of the page. That's not what they're for.

      Put another way, tabs are primarily just a replacement for having multiple individual browser windows open.

    4. Re:Easy by GuB-42 · · Score: 1

      I am not sure there really is a point trying to circumvent this limitation.
      There is no point in showing ads and monitoring background pages, and developers probably don't mind being throttled in this case. In fact, they probably want this behavior but are too lazy to check whether or not the page is actually visible before running their scripts at full speed.

    5. Re:Easy by Nunya666 · · Score: 1

      Indeed.

      Why not have a checkbox on every tab that defaults to off, and which dictates whether the page updates at all when the tab is inactive? Almost all tab use is, unfortunately, a lazy substitute for bookmarking, of pages that don't need to update when not viewed.

      You're an idiot to assume that your use case is also everyone else's use case. Or just an arrogant ass. Or both.

      I use multiple tabs when doing Internet searches. I always right-click links and select Open Link in New Tab. That way, I can close an irrelevant new tab without losing track of my search, and without having to backtrack to the correct page in the history. I can also leave a slow-loading new tab alone while I look at another tab. Or even right-click > Open on 2 or 3 links in a row so they can refresh in the background.

    6. Re:Easy by arth1 · · Score: 1

      Speak for yourself. Code reviews - one tab per file, close each tab as the file is reviewed = more efficient. Evaluating product pricing across shop sites - more efficient to keep each shop in a tab and flip between them. Research - each link in a wikipedia page can be opened in a tab and read in sequence.

      None of those scenarios seem to me to require background updates of the pages after they have been rendered once?

    7. Re:Easy by arth1 · · Score: 0

      You're an idiot to assume that your use case is also everyone else's use case. Or just an arrogant ass. Or both.

      Pot, meet kettle.

      I use multiple tabs when doing Internet searches. I always right-click links and select Open Link in New Tab.

      So do I. As someone recently said, "you're an idiot to assume".

      How would that use case be negatively affected by preventing javascripts and reloads? Unless you use a search engine that redirects all your windows to their page so they can track your search results, I don't see a negative effect if the background pages stop updating after the initial rendering for as long as they stay in the background.
      And even then, all that is needed is a timer. Stop updating after having been in the background for, say, 10 seconds, which should let the pages redirect and render on all but the slowest machines. The page will be pre-rendered for you to look at, but won't steal CPU cycles and bandwidth while you're not looking at it.

    8. Re:Easy by Anonymous Coward · · Score: 0

      Stop gaslighting. It's dishonest. Literally nobody that you've responded to here is making the case against timer throttling. They are simply taking issue with your assertion that tabs are a substitute for bookmarks. They emphatically are not, and no reasonable person could take that position.

    9. Re:Easy by arth1 · · Score: 1

      They are simply taking issue with your assertion that tabs are a substitute for bookmarks. They emphatically are not, and no reasonable person could take that position.

      I explicitly added a qualifier so I would not come across as saying they always are. Do I have to add <BLINK> tags?
      Of course there are other uses. I never said otherwise.

      But when someone has a huge number of tabs open, and don't look at most of them, yes, they are used as bookmark substitutes. Walk around your office. Watch how prevalent this is.

    10. Re:Easy by Anonymous Coward · · Score: 0

      Yep. Will it auto detect a completely silent audio stream and throttle after x seconds of silence?

      (Actually I'm all for some way of disabling this. My iPad does something similar and it's a pain. Say for example you're filling out a form and halfway through you realise need to google something (or check email) to finish: so you open a new tab, and then it's 50/50 whether the form is still open when you go back to finish it.)

    11. Re:Easy by Anonymous Coward · · Score: 0

      >Almost all tab use is, unfortunately, a lazy substitute for bookmarking,

      WHAT?

      So when one right-clicks and opens in new tab, (but not quite finished with current article), you are suggesting one should instead bookmark the page? ANd come back to it later? What?

      With the amount of in-article hotlinks any one page has that would be waay inappropriate for a user. Unless you go back and erase every bookmark after reading said referred-to page.

      EXAMPLE:
          Reading article about Antarctic shelf breaking off. Halfway through the article the word global plate tectonics is mentioned & hyperlinked. You open in new tab- happy to learn something new but not now, after the current article. OK you run across new terms or personalities that are not hyperlinked but you open a new tab to search the term- and will come back to it after article.

      SO you are suggesting we are to make as many bookmarks as pique our interest, hold them in reserve until we read them, (which could be one minute away), and then erase our bookmarks as each interest is complete?

    12. Re:Easy by JackieBrown · · Score: 1

      They are simply taking issue with your assertion that tabs are a substitute for bookmarks. They emphatically are not, and no reasonable person could take that position.

      I explicitly added a qualifier so I would not come across as saying they always are. Do I have to add <BLINK> tags?
      Of course there are other uses. I never said otherwise.

      But when someone has a huge number of tabs open, and don't look at most of them, yes, they are used as bookmark substitutes. Walk around your office. Watch how prevalent this is.

      I use them more as disposable pages. Stuff that I might get to if an early page doesn't answer a question or a page I might want to read but don't care enough to bookmark it.

    13. Re:Easy by Anonymous Coward · · Score: 1

      Nah, almost all tab use is a necessary work around to the overall shitty design of websites. The core problem being that page navigation is _slow_ especially with advert, analytics, shitty JS frameworks and otherwise junk ridden modern websites. If you go to a site, such as a news site, and want to visit multiple sub pages the best way to avoid this slowness is to open the links in the tabs and let them load "in parallel" vs navigating to one, then navigating back to the main page, then navigating to the next. (rinse, wash, repeat).

      Until/unless websites load in 1 sec again tabs will continue to be the better option.

    14. Re:Easy by thegarbz · · Score: 1

      I guess we'll be seeing a lot more pages that play audio soon.

      Why? What's the point? There's no benefit to chewing up the end user's CPU for an ad they aren't actively watching.

      Advertising companies are stupid for the most part, not malicious. Web designers also are stupid for not testing things like CPU load on their scripts. There's no point in circumventing the restriction unless you're mining bitcoins in a tab, in which case the user likely has bigger problems.

    15. Re:Easy by Anonymous Coward · · Score: 0

      Not only will they be playing audio, they'll probably be playing silence as audio just to keep themselves awake. This will make the software audio mixer work harder while downloading lots of extra silent audio clips (which should at least compress well). Further this will make the software mixer and audio hardware work more often overall as the hardware generally shuts off when there's nothing to do...and now there's always something to do.

      End result: Increased bandwidth consumption AND battery power consumption.

      After that Google will introduce a signal threshold for an empty audio signal which means the CPU now has to work to discover if there's any work to do, thus doing twice the work. Meanwhile advertisers will game this by increasing the base signal just enough to tip it over the threshold and cause it to play. All the while the CPU will be doing twice the work for no reason and this code will stay in Android codebases for the next 50 years and we won't know why it sucked up 1,000,000TW/h of worldwide power.

      But we would have burned that power on cat videos anyway so no big deal.

    16. Re:Easy by Anonymous Coward · · Score: 0

      Exactly, and that's why background tabs should get 0 CPU by default after they've been open for longer than 10 seconds.

    17. Re:Easy by Anonymous Coward · · Score: 0

      Since apparently you can decided for everyone, I will decide for everyone:

      Yes. Background tabs get 0 CPU, donot decide how I use my tabs.

    18. Re:Easy by Anonymous Coward · · Score: 0

      What's the difference between tabs and bookmarks? Tabs require less work for the user. The user is "lazy." In fact, the user should just print everything to paper and store it in a filing cabinet, which uses no compute power. Geeze, those damn lazy users want the computer to do all their work for them.

      With proper design, tabs and bookmarks should be equivalent.

  2. Except audio.... by Anonymous Coward · · Score: 0

    The only pages that appear to be exempt from the throttling are those that play audio.

    Cool, so now we'll have even more ads playing audio!

    1. Re:Except audio.... by Anonymous Coward · · Score: 0

      its 2017, go get adblock plus.

    2. Re: Except audio.... by Anonymous Coward · · Score: 0

      It's 2017, pages now detect adblockers

    3. Re: Except audio.... by Anonymous Coward · · Score: 0

      So now we need adblockers that detect pages that detect adblockers.

    4. Re: Except audio.... by tepples · · Score: 2

      So now we need adblockers that detect pages that detect adblockers.

      Some already do. But this may violate anti-circumvention law, be it a country's WIPO Copyright Treaty implementation (such as the Digital Millennium Copyright Act) or laws defining trespass upon a networked computer (such as the Computer Fraud and Abuse Act).

      But if website operators try to assert the DMCA or CFAA against ad blocker developers, the latter will probably end up building plausible deniability into their products. Instead of blocking ads per se, they'll block third-party tracking (such as Disconnect), block content-types, and pause page loads that exceed 1 MB. This CPU throttling appears to have a similar intent.

    5. Re: Except audio.... by ctilsie242 · · Score: 1

      That is what Greasemonkey/Tampermonkey are for, as an addition to uBlock Origin. They help somewhat, but some sites still skitter around them. Definitely an arms race going on.

    6. Re: Except audio.... by Anonymous Coward · · Score: 0

      USA only law. Who cares lol... ABP is a go!

    7. Re: Except audio.... by Anonymous Coward · · Score: 0

      If I can't quickly circumvent their adblockblock with another adblock filter the site goes straight into my mental garbage can. I haven't encountered such a site yet that was irreplaceable enough to be worth spending time finding another countermeasure (or turning adblock off and risking my security)

    8. Re: Except audio.... by tepples · · Score: 1

      Slashdot is a U.S.-based site, and the U.S. is not the only party to the WIPO Copyright Treaty.

  3. Silent audio by Anonymous Coward · · Score: 0

    Then the bad guys will play silent audio to abuse the system...

    1. Re:Silent audio by ctilsie242 · · Score: 1

      Nope... they will just sell audio ad space to all comers.

  4. It's usually more efficient to run at full speed by Anonymous Coward · · Score: 1

    There are two types of processing jobs: One is a fixed amount of work, the other is as much work as can be done. You only save battery power by throttling the latter. The fixed amount of work type of job is usually more efficiently executed at full speed. So this may backfire. And who believes this isn't Google throttling competitors' analytics scripts while not throttling their own?

  5. Make the speaker icon blink by tepples · · Score: 4, Interesting

    Silent audio won't necessarily work, as browsers are already detecting whether a video's audio is silent. In Firefox 51, this video that has intermittent audio causes the speaker icon in the tab to blink on and off whenever the game plays a sound effect.

    1. Re:Make the speaker icon blink by fishscene · · Score: 2

      Well, now ads and such will be playing background static noise. Those tiny hisses and other barely-audible noises your motherboard makes will be recorded and played back by ad companies to get around this. So now everyone can enjoy hunting down why their $300 speaker system is generating noise it shouldn't, when it's really an obnoxious ad.

    2. Re:Make the speaker icon blink by ewhenn · · Score: 1

      Silent audio won't necessarily work, as browsers are already detecting whether a video's audio is silent. In Firefox 51, this video that has intermittent audio causes the speaker icon in the tab to blink on and off whenever the game plays a sound effect.

      Easy solution, the audio file will be a constant tone at 100 kHz. The user wouldn't notice it since it is well outside human hearing range, and the sound is playing 100% of the time.

    3. Re:Make the speaker icon blink by omnichad · · Score: 1

      Google Chrome only supports up to 48KHz audio. Good luck encoding a 100KHz tone with less than a 200KHz sample rate.

    4. Re:Make the speaker icon blink by LunaticTippy · · Score: 1

      Pretty much nobody can hear sounds above 20KHz. Heck, many of us can't hear much above 15KHz, and that is for the few PC rigs that can play frequencies that high.

      No need to even get fancy with frequencies. You could play a 100Hz tone at very low amplitude and nobody would notice unless they saw the speaker icon on the tab.

      --
      Man, you really need that seminar!
    5. Re:Make the speaker icon blink by allo · · Score: 1

      20k is easy to hear for young people. Try 40k.

    6. Re:Make the speaker icon blink by Anonymous Coward · · Score: 0

      Nyquist. A 44.1Khz hardware audio buffer can only code up to 22,050Hz before aliasing occurs and the perceived frequency and power is lower than you expected. Some hardware buffers might be rendering 48Khz but that's less likely.

      Either way you can't put 40KHz into an audio stream.

  6. Will Google customers get preference? by OffTheLip · · Score: 1

    Page rank, etc. might influence timer thresholds.

  7. Embraced, Extended, which part is next? by Anonymous Coward · · Score: 0

    Now that they are just willy-nilly deciding to change web standards, what is next?

    Embrace/Extend/Extinguish anyone?

    1. Re:Embraced, Extended, which part is next? by Anonymous Coward · · Score: 0

      Both Firefox and Chrome have been throttling timers of backgrounds tabs to 1 second min, this is just an addition to that

  8. Two tab uses that aren't bookmark substitutes by tepples · · Score: 2, Insightful

    Almost all tab use is, unfortunately, a lazy substitute for bookmarking, of pages that don't need to update when not viewed.

    Key words: "Almost all". I can think of a couple exceptions that aren't "a lazy substitute for bookmarking":

    • I'm opening a bunch of documents in the background while I read a different document in the foreground on a computer that's not quite the fastest, and I'm reading the present document to give the browser time to load and render the other documents. These other documents need CPU time so that they aren't blank once I get around to them. Using bookmarks instead would produce a blank screen for several seconds while the document loads and renders. Even reading the first part before the rest has finished loading often isn't possible because of anti-FOUC measures that web sites are using nowadays.
    • I'm opening a bunch of documents in tabs so that I can put my laptop to sleep and then read them later while I'm offline riding the bus to or from work. These other documents need the network, but they don't need CPU time unless they use the abomination known as "lazy loading". Using bookmarks instead would produce the error message "You are offline".
    1. Re:Two tab uses that aren't bookmark substitutes by Anonymous Coward · · Score: 0

      Your use case is mine too - I think the way around it is that the code should, if you use a function such as "right-click, open in new tab" that the page gets its full budget of CPU for 10 seconds or so, then gets throttled. Not sure if they thought of that though.

    2. Re:Two tab uses that aren't bookmark substitutes by arth1 · · Score: 1

      Key words: "Almost all". I can think of a couple exceptions that aren't "a lazy substitute for bookmarking":

      And that's where it would come in handy to have a checkbox, which would allow javascript and refreshes for that URL even when in the background. It would be a one-time switch flip for the sites where it's needed.

    3. Re:Two tab uses that aren't bookmark substitutes by Darinbob · · Score: 2

      Tabs are like the piles of papers on your desk. Someone may point to the desk and claim it is inefficient, just file everything into properly labeled folders and put them away when you are done. But in reality it doesn't happen. You're working on one thing and then someone walks by and drops another project on your desk, asks you a question that you have to research before the person leaves, or you get an email that says "please finish filling out form XYZ by the end of the day". After a few iterations of that you've got a pile of stuff on the desk and an empty file folder.

      Tabs are the same. You open a new tab not because you are completely finished with the old tab but because you need or want to look at something new. Trying to do it all with bookmarks can be clumsy. "Oh, I need to come back to this page I'm reading after lunch, let me book mark it and give it a suitable name", said no one ever.

    4. Re:Two tab uses that aren't bookmark substitutes by Anonymous Coward · · Score: 0

      Sounds like you have just created a chrome extension. Let me know when it's in the chrome store!

    5. Re:Two tab uses that aren't bookmark substitutes by Anonymous Coward · · Score: 0

      The Great Suspender?

    6. Re:Two tab uses that aren't bookmark substitutes by FatdogHaiku · · Score: 1

      The Great Suspender?

      Isn't that the extension for supporting content that is pants...

      --
      You have the right to remain sentient. If you give up the right to remain sentient, you will be elected to public office
  9. Coming soon - audio everywhere! by Phiz · · Score: 1

    Great, now ever page with an advertisement on it will play some audio in order to get around the timers.

    1. Re:Coming soon - audio everywhere! by The+MAZZTer · · Score: 1

      Chrome displays an icon in tabs that play audio, you can click it to mute the tab. Not a big problem.

    2. Re:Coming soon - audio everywhere! by Altrag · · Score: 1

      Until every page does it and you have to interrupt your flow in order to move your mouse up and click the tiny icon after every single tab load. Plus the wasted bandwidth downloading a bunch of audio that you don't want and are just going to disable immediately anyway.

      And then add on the fact that unless all browsers implement similar features, anyone who uses not-Chrome will be at even more of a disadvantage.

      I don't know what the solution here is. They obviously don't want to prevent people who listen to music intentionally but I imagine its rather hard to differentiate intentional audio from advertising without the user having to explicitly click a toggle every time or setup a whitelist filter or some such (which I personally do anyway as I've got a bunch of addons to try and prevent the already-annoying video ads from autoplaying all over the damned place, but I recognize the fact that average non-techie types wouldn't really know where to begin with doing something like that.)

  10. Stop those css popups by ArchieBunker · · Score: 4, Interesting

    Can they stop those css pop up screens? You know the kind that darken your background and ask for your email address when browsing many sites? You are forced to try and look for the nearly invisible X to close them. Tons of mainstream sites do this and its annoying as hell.

    --
    Only the State obtains its revenue by coercion. - Murray Rothbard
    1. Re:Stop those css popups by Anonymous Coward · · Score: 0

      Some of them put the low-contrast X in the very top right of the browser area while the pop-up is only in the center area.

    2. Re:Stop those css popups by Anonymous Coward · · Score: 0

      Block the script to block the popup.

    3. Re:Stop those css popups by l20502 · · Score: 2

      There's BehindTheOverlay, you just have to click the button and it removes the overlay.

    4. Re:Stop those css popups by omnichad · · Score: 4, Informative

      Right-click, inspect element. Look down. Right click, delete element. Done.

    5. Re:Stop those css popups by Anonymous Coward · · Score: 0

      You can use the Stylish extension to hide these screen.

    6. Re:Stop those css popups by Anonymous Coward · · Score: 0

      Just use the close box or 'x' on the tab itself.

  11. Apple Called... by TheFakeTimCook · · Score: 0

    ...They want their Safari Power-Saver Feature from THREE YEARS AGO back.

    And although I can't seem to find any web pages on it, Safari also pauses Tabs that are "in the background", too.

    1. Re:Apple Called... by Anonymous Coward · · Score: 2, Informative

      Safari purges tabs in the background all the time saving enormous amounts of processing, yet it reloads them far too frequently as well wasting even more.

    2. Re:Apple Called... by aurum42 · · Score: 1

      I believe the "tab purging" only happens on iOS, not on MacOS. However, as the OP notes, Safari has had the timer throttling on background tabs for years.

      --
      "The slave who knows his master's will and does not get ready...will be be beaten with many blows."Luke 12:47-48
    3. Re:Apple Called... by Anonymous Coward · · Score: 0

      And RTOS kernels from the 80's called and want their Priority Aging algorithm back. The browser is re-inventing preemptive scheduling algorithms. Yo dawg we heard you like kernels.

    4. Re:Apple Called... by tepples · · Score: 1

      The browser is re-inventing preemptive scheduling algorithms.

      Which isn't necessarily a bad thing. Not all web applications would work better as native applications, especially because most users don't want every web app to become (say) Mac-exclusive.

    5. Re:Apple Called... by Darinbob · · Score: 1

      This is common sense. If the page is not visible, then it should NOT do anything. If it's still hogging the cpu when I can't see it then that is lazy ass programming by a wannabe coder. The timer solution idea has been used in many applications and systems in the past, though not exactly the same way. It's hardly a new groundbreaking concept, it's quite like dynamic priorities in unix systems. Better to use have the headline read "Chrome throttles cpu usage of background tabs, but still is unable to completely stop them for fear of angering the advertising overlords."

    6. Re:Apple Called... by TheFakeTimCook · · Score: 1

      This is common sense. If the page is not visible, then it should NOT do anything. If it's still hogging the cpu when I can't see it then that is lazy ass programming by a wannabe coder. The timer solution idea has been used in many applications and systems in the past, though not exactly the same way. It's hardly a new groundbreaking concept, it's quite like dynamic priorities in unix systems. Better to use have the headline read "Chrome throttles cpu usage of background tabs, but still is unable to completely stop them for fear of angering the advertising overlords."

      LOL!

  12. Re:It's usually more efficient to run at full spee by tepples · · Score: 2

    The problem is documents that run "as much work as can be done"-type tasks that don't benefit the user, such as sending a client-side real-time-bidding ad auction out to forty different ad networks. So perhaps the goal is to discourage documents from running "as much work as can be done"-type tasks at all without the user's consent.

  13. audio by spikenerd · · Score: 1

    The only pages that appear to be exempt from the throttling are those that play audio.

    So pages that steal computing cycles will start playing inaudible sounds while they work. This will stop all the scripts except for those that really should be stopped, and annoy pet dogs around the world too.

  14. And Chrome makes itself suck even *more* for games by pla · · Score: 1

    First, they block flash by default (yeah, Flash sucks - But 90% of online games still use it, and I want them to work); Unity virtually never works in Chrome; and now Google wants to cripple the small number of games that follow their own damned guidelines by using pure JS/HTML5?

    I wouldn't care quite so much if Mozilla didn't appear dead set on committing suicide, but at this rate, I'll be running Edge by the end of the year!

  15. ^W stops css popups by tepples · · Score: 4, Insightful

    To block sponsor and mailing list pop-overs, just press Ctrl+W (Command-W on macOS).

  16. so... by Anonymous Coward · · Score: 1

    does that mean I can keep 500 tabs open, instead of 50?

  17. Re:And Chrome makes itself suck even *more* for ga by aurum42 · · Score: 1

    Genuinely curious, when do you think it's useful to run games in background tabs? And I thought they just added "click-to-flash", rather than preventing you from viewing flash content entirely, which seems totally reasonable. That's a decision that saves memory/energy with the option of still using flash, and anything that gets the abomination known as flash off the web sooner is a good thing.

    --
    "The slave who knows his master's will and does not get ready...will be be beaten with many blows."Luke 12:47-48
  18. Google is out of touch by Anonymous Coward · · Score: 0

    "exempt from the throttling are those that play audio." are the tabs that consume the most CPU and are most annoying. They should be throttled the most. Google people live in their own little bubble and have such little interaction with people outside of Google that they no longer understand users.

  19. Hear the silence by deadhammer · · Score: 1

    According to the article (yes, I RTFA), here's the criteria:

      -Each WebView has a budget (in seconds) for running timers in background.
    - A timer task is only allowed to run when the budget is non-negative.
    - After a timer has executed, its run time is subtracted from the budget.
    - The budget regenerates with time (at rate of 0.01 seconds per second).

    This suggests a few ways around this.

    - Play a 0.1 second silent audio sample on page load, throwing the page into "non-throttle mode".
    - If "playing audio" itself only keeps the page's budget from decaying for a short time, play a 0.1 second silent audio sample before every timer call.
    - Change your timer code to record its own runtime and set the next refresh to (runtime(ms) * 10). Ie. if your tracker call took 310ms to execute, set the refresh to 3100ms, or 31 seconds. If nothing else this would force ad trackers to write some efficient code for once.
    - "HEY WEB SURFER WE'D JUST LIKE TO TAKE THIS OPPORTUNITY TO PLAY YOU OUR AMAZING JINGLE AND YOU WON'T BELIEVE WHAT HAPPENS NEXT!" ::90 second extended cut::

    I'm not exactly sure how to mitigate that. Silent audio detection? (solved by playing a 40khz tone that you won't hear but will drive your pets bonkers) Option to turn it off? (disables your music streaming app after a while) That option with whitelists? (manual intervention == annoying your customers)

    --
    I'll be honest, we're throwing science against the wall to see what sticks. -Cave Johnson
    1. Re:Hear the silence by ctilsie242 · · Score: 1

      The easiest way would be a checkbox to turn off all audio, and not have audio sites have an exception. Even better, a checkbox with a whitelist, so the few sites I want to listen to (i.e. YouTube) are OK, but everything else gets muted.

  20. Wow, what a loophole! by Wrath0fb0b · · Score: 1

    The only pages that appear to be exempt from the throttling are those that play audio.

    So every page is now going to play a silent audio track in a loop in order to work around this limitation?

    This is a common trick in iOS applications to prevent the system from backgrounding you when off-screen. It won't take long to migrate to the web . . .

  21. Chrome Extension - The Great Suspender by Anonymous Coward · · Score: 0

    https://chrome.google.com/webstore/detail/the-great-suspender/klbibkeccnjlkjkiokjodocebajanakg?hl=en

    Automatically suspends unused tabs to free up system resources

    Unload, park, suspend tabs to reduce memory footprint of chrome.
    Tabs can auto-suspend after a configurable period of time or be suspended manually. Tabs can be whitelisted to avoid automatic suspension. Suspended tabs are retained after closing and reopening browser, preventing many tabs from all reloading after a restart. Very simple, intuitive interface.

    The Great Suspender is a lightweight chrome extension to help reduce chrome's memory footprint for users that like to have too many tabs open at the same time. This extension will automagically unload each tab while retaining its favicon and title text. A tab can be restored by clicking anywhere on the page when it is needed. This reduces the number of dom elements on the page and ensures no memory leaks or excessive javascripts are running.

  22. Re:And Chrome makes itself suck even *more* for ga by Anonymous Coward · · Score: 0

    The only game you could be 'playing' in a background tab is one of those stupid cookie clicker clones. Frankly, the world would be better off if those were crippled.

  23. Why is it so hard by H3lldr0p · · Score: 1

    to have a mainstream browser just be a browser?

    I'm going to sound like an old man but there was a time when all Chrome was aiming for was to be fast and lean. And it was able to be that. Something changed and now Google wants to use it for more than that. Which is when these sorts of things always go to shit. We saw it with IE, which was always shit but it got even more shit to everyone's surprise. Firefox keeps going through cycles of shittiness. Ug.

    1. Re:Why is it so hard by l20502 · · Score: 1

      Something changed and now Google wants to use it for more than that.

      1) Make a product that does something better than the competition
      2) Push your product to be bundled with everything
      3) When you have almost monopoly, do what the fuck you want

      Reminds you of something?

    2. Re:Why is it so hard by ctilsie242 · · Score: 1

      Browsers have pretty much replaced operating systems these days, so a browser has to have all the security features an OS does, because they execute untrusted code 24/7. Eventually OS makers will get smart, add tier 1 hypervisors, and have the browser be on its own VM with a separate memory and filesystem space, so a compromised browser doesn't hose the user.

    3. Re:Why is it so hard by Anonymous Coward · · Score: 0

      My career now is to take a good, fast, functional console application and turn it into a web application. A slow, buggy, quirky web application.

      It's what everyone wants nowadays.

    4. Re:Why is it so hard by CastrTroy · · Score: 1

      Microsoft has already started doing this with Edge. Mind you they are only doing it on the Enterprise version of Windows, but I could definitely see this happening on the consumer versions in the near future. It definitely makes sense considering all the stuff the browser is doing to make sure that it doesn't interfere with the security of the system.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
  24. Audio Only? by Anonymous Coward · · Score: 0

    What about background video? I often leave news, music or other similar content playing in a background tab.

  25. Re:And Chrome makes itself suck even *more* for ga by pla · · Score: 1

    when do you think it's useful to run games in background tabs

    Two obvious situations come to mind. First, "Idle" games, where you basically just let it run in the background and check in on it once an hour. And second - Let's say I want to look something up (maybe a Wiki for the game itself) in another tab; online games typically do not react gracefully to losing their network connection, and I would be shocked if being throttled for more than 100-250ms per second wouldn't have almost the same effect.


    anything that gets the abomination known as flash off the web sooner is a good thing.

    If you don't want to run Flash - Then don't. My computer? Not yours to decide what runs on it.

  26. Re:And Chrome makes itself suck even *more* for ga by tepples · · Score: 1

    when do you think it's useful to run games in background tabs?

    When they're streamlined simulations of an RTS's tech tree. Click the cookie a few times and I'll explain.

  27. Note to Google Chrome team: Re: Audio by presidenteloco · · Score: 1

    It is always wrong (ok, 99.9% of the time wrong) to have more than one context/page/plug-in instance in the browser play audio at a time, whether the context is backgrounded or not.

    From a user perspective, the result of multiple concurrent audio streams is garbled, unintelligible, dissonant sound.

    So if you can save power by preventing that, do so.

    Related case in point: When a browser re-starts after a crash, it often seems to start auto-playing a bunch of separate youtube videos (which had been paused or at-end-of-video) on backgrounded pages. Again, this is ALWAYS the wrong thing for the browser to do.

    --

    Where are we going and why are we in a handbasket?
    1. Re:Note to Google Chrome team: Re: Audio by Anonymous Coward · · Score: 0

      Something like skype in one tab and background audio in another tab.

    2. Re:Note to Google Chrome team: Re: Audio by LunaticTippy · · Score: 1

      It is always wrong (ok, 99.9% of the time wrong) to have more than one context/page/plug-in instance in the browser play audio at a time, whether the context is backgrounded or not.

      Are you sure about that? I count on my mail tab to ding when I get mail, my voice tab to ring when a call is incoming, and my friendster tab should ding when someone posts to my page.

      --
      Man, you really need that seminar!
    3. Re:Note to Google Chrome team: Re: Audio by presidenteloco · · Score: 1

      ok, good points. Perhaps short little audios like that are ok.

      Bult multiple videos with audio playing in background tabs? That should be something you have to explicitly enable as a user. Not the default.

      Or at the VERY least, you should have the option to set your browser up as doing pause-on-background as its behaviour default.

      --

      Where are we going and why are we in a handbasket?
    4. Re:Note to Google Chrome team: Re: Audio by presidenteloco · · Score: 1

      Also, I should say: Fine, as long as you don't work in an open plan office, or always use a headset.

      Otherwise, your office mates will think you are a "ding"bat.

      --

      Where are we going and why are we in a handbasket?
  28. "throttle" to ZERO by jtara · · Score: 2

    Egads, what took so long? This should have been done YEARS ago.

    But tabs I am not looking at, (by default) should use ZERO CPU. I get that I might launch several tabs quickly and want to allow them to load. So, allow some time for them to load, but then cut it to zero.

    Give me the OPTION to change this behavior. Give me the OPTION to play music in background (either globally, or on a specific tab). And for gosh sake, SHOW ME how much CPU each tab is using (optionally). Then I will know to avoid the sites that are using my browser to bitcoin-mine.

    Apple had to clamp down on iOS apps that were abusing the "background audio" flag. Too many apps just played silent audio. Now, playing silent audio will get the app bounced from the store.

    Unfortunately, the web has no benevolent dictator vetting sites. OF COURSE "background audio" will be abused!

    1. Re:"throttle" to ZERO by Anonymous Coward · · Score: 0

      Well said. Just freeze tabs that has no focus after they finished loading and don't allow them to play anything.

    2. Re:"throttle" to ZERO by vyvepe · · Score: 1

      But tabs I am not looking at, (by default) should use ZERO CPU. I get that I might launch several tabs quickly and want to allow them to load. So, allow some time for them to load, but then cut it to zero.

      Give me the OPTION to change this behavior. Give me the OPTION to play music in background (either globally, or on a specific tab). And for gosh sake, SHOW ME how much CPU each tab is using (optionally). Then I will know to avoid the sites that are using my browser to bitcoin-mine.

      This! I was reading this discussion to find out whether I need to post myself. You did it for me. Thanks :)
      No freaking way should background tabs run scripts by default.

    3. Re:"throttle" to ZERO by Altrag · · Score: 3, Informative

      If you're using Chrome, check out an addon call The Great Suspender (maybe it exists in FF too, I haven't checked.) Its been a lifesaver for a tab hoarder like me.

    4. Re:"throttle" to ZERO by Anonymous Coward · · Score: 0

      And for gosh sake, SHOW ME how much CPU each tab is using (optionally).

      SHIFT+ESC shows memory, CPU and network usage

    5. Re:"throttle" to ZERO by Anonymous Coward · · Score: 0

      Great app. But I don't want to suspend the page and be unable to instantly see it when I switch back.

  29. too much detail by sacrilicious · · Score: 1

    The idea is to limit the processing power that background tabs get.

    Got it. Simple, succinct, perfect.

    (1) Each WebView has a budget (in seconds) for running timers in background. (2) A timer task is only allowed to run when the budget is non-negative. (3) After a timer has executed, its run time is subtracted from the budget. (4) The budget regenerates with time (at rate of 0.01 seconds per second).

    Of what interest is it to anybody that the pseudo-code for this is the above, vs some other slightly different variant of how to restrict allocated processing time? Users aren't going to care. And if developers try to somehow design around this level of detail, they'll break if the algorithm ever changes.

    When I tell a friend I'll show up for dinner, I don't then explain that I'm going to do so by walking one foot at a time until I get to the dinner place, at which point I'll commence chewing and swallowing.

    --
    - First they ignore you, then they laugh at you, then ???, then profit.
  30. noisy pages loading :-( by PMuse · · Score: 1

    The only pages that appear to be exempt from the throttling are those that play audio.

    Dadgummnit! Those noisy ads that auto-play while I'm pre-loading news articles are the ones I want suppressed.

    When I spawn a tab to pre-load a (quiet) article, I want it to load ASAP, not throttled.

    --
    "We reject as false the choice between our safety and our ideals." --The American President (20.1.2009)
    1. Re:noisy pages loading :-( by Altrag · · Score: 1

      Presumably, the throttling would a) not apply until the page is actually loaded and b) have enough initial budget that the vast majority of pages wouldn't notice for at least several seconds after the initial load is complete.

      I mean if you've got a webpage that manages to full bore your CPU for 10+ seconds as soon as it loads.. the page designer probably should be doing something different, throttled or not.

  31. Sounds like it's only useful for laptops by Rujiel · · Score: 1

    If they are concerned about battery like, i don't figure they are talking about mobile devices, the browsers for which all already pause javascript execution as soon as the tab is backgrounded.

  32. Wrong model... Should work like Fine Location by NotARealUser · · Score: 1

    Tying this to audio only is a bad UI design. Otherwise we are going to be seeing a lot more audio applications.

    This should not be arbitrarily set by Google. Instead, it should come up as a permissions pop-up like the location permissions...

    For example, it could say... This application wishes to update in the background more frequently than the recommended levels. This may affect battery life. Do you approve" [Yes] [No]

  33. The Great Suspender by Anonymous Coward · · Score: 0

    Just use the Great Suspender. Google it - it's for Chrome.

  34. Finally by Anonymous Coward · · Score: 0

    The reason I dumped Firefox for Chrome about 2 years back, it was acting like Chrome does now. It's not "lightweight" at all whatsoever. I have 16GB of RAM, and it's not uncommon for me to see 4-5GB taken up by Chrome alone. Using the OneTab extension is a godsend, as soon as I click, I get at the very least 4GB of memory freed up.
    What is it with modern browsers adding more and more shite as they progress? Firefox started off just the way Chrome did, and nowadays it comes complete with a kitchen sink and god knows what else. Chrome is doing the exact same thing. Things shouldn't be updated just for "the hell of it", browsers should not slow down over time, you'd think as time progresses they would become more efficient.... And all of this is with the Flash player completely disabled (worst software ever ever created in the history of computing).

  35. How does this affect work tabs? by TFlan91 · · Score: 1

    I have several tabs open all day long in the background for time tracking.

    They use setInterval for autosaving. As this is semi-important, I wouldn't want this tab to be throttled.

    Will there be an easy to use UI for disabling this throttle on a per tab basis? Perhaps in the context menu?

    1. Re:How does this affect work tabs? by Anonymous Coward · · Score: 0

      Hahaha, you think there will be a UI to disable this shit? We're talking about Google, here.
      They are making this for retards that think "google" is an internet. An option is too smart for them, it will only serve to confuse them.

      Timers are already throttled as it is.
      This is just an even shittier ("better") version that will destroy so many HTML5 apps that depend on constant time ticking. (for whatever, handling sessions, shit Facebook chat, stock index, auto-saving, etc.)
      A big one will be tabs that use in-tab file API to manage files between a network and client. This will destroy SO MANY "cloud" apps it is hilarious. So many people are going to get errors soon.

    2. Re:How does this affect work tabs? by Altrag · · Score: 1

      Do those tabs consistently use more than 1% CPU each? Cause if they don't, the throttling will likely have little or no effect on them.

      This is to stop stupid things like ad carousels that rotate every 5 seconds whether you're looking at them or not. Or just flat out poorly-programmed JS that sucks up all available CPU just because the developer couldn't be bothered with something more complex than busy loops and other dumb stuff like that.

      There will probably be the odd legitimate app that gets negatively affected, but most even-vaguely-well-written legitimate apps (web or not) don't sit there sucking up huge amounts of CPU time unless you're actively working with them. A basic autosave cycle every 5 or 10 minutes is very unlikely to trigger the throttling.

  36. Idle Clicker games by Anonymous Coward · · Score: 0

    This better bot affect idle clicker games on Kongregate, I always keep 1 or 2 running in a background tab.

  37. Motivation? by DontBeAMoran · · Score: 1

    The motivation behind the chance is that some pages consume a lot of CPU when they are in the background.

    Okay, but what does luck have to do with it?

    --
    #DeleteFacebook
  38. A web page should do nothing when I'm not looking by istartedi · · Score: 1

    No web page should do anything when you're not looking at it. Full stop. Pun intended.

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  39. Weren't timers originally disabled? by BarbaraHudson · · Score: 2

    Weren't timers originally disabled for pages in the background? Whose stupid idea was it to enable them? I'd like to see background pages completely disabled - downloads are handled by a separate mechanism anyway, so if you start a download and then go to another page, who cares?

    --
    "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
    1. Re:Weren't timers originally disabled? by Anonymous Coward · · Score: 0

      Those that use pages where you have to wait 10 seconds before the download starts.

  40. Re:And Chrome makes itself suck even *more* for ga by Anonymous Coward · · Score: 0

    Gee, I dunno, apparently not everyone is stuck in the 90s.
    Perhaps phones should fuck off and stop ruining desktop software.
    This stupid shit already exists to an extent and now they are going even more retarded in to this idea.
    Maybe add this as an OPTION so I can never have it enabled.

    Here's hoping the way around it won't get censored as well for stupid phone kiddies.
    You can use event listener timers with postMessage instead. Even in Chrome this method is faster than native timers. MUCH faster. And that's with the tab visible!
    Have some awful code
    Try this with both the tab visible and not.

  41. web rtc exception by Anonymous Coward · · Score: 0

    let's hope this excludes tabs where the mic or camera is being shard

  42. Google you idi9ts by Impy+the+Impiuos+Imp · · Score: 1

    1. Skip "CPU Budget" stuff

    Just have a throttle of 10 or 100 or 1000 script actions per second, set well below browser lockup speed. To hell with reviews your browser is 0.028% slower than IE or Edge or Opera, running balls out locked up.

    ATTN REVIEWERS OF BROWSERS: When you review for script speed, not caring about lockup, you are full of fail. This is all your fault.

    2. I don't care what standard allows popups -- get rid of them.

    3. I don't care what standard allows message boxes -- get rid of them.

    4. I don't care what standard allows music or video autoplay -- have an all off button at the tab level. Let people set it permanently "for just this site."

    5. Investigate why editing is slow and stuttered on Slashdot text entry for a message like this with Chrome on a S6. Whose crappy, chatty script implementation is calculating PI to a million digits between each letter?

    --
    (-1: Post disagrees with my already-settled worldview) is not a valid mod option.
  43. Foreground too, and all browsers, PLEASE by markdavis · · Score: 1

    >"Google plans to roll out a change in Chrome Stable soon that will have the browser throttle timers in background tabs to improve battery life and browsing performance."

    It also kills remote access and thin clients. I have been screaming about this for years. And it shouldn't just be for background tabs, it should be for foreground ones too... if you are idle or the window doesn't have focus, there should be a way to throttle the hell out of the thing! Timers, animation, mouse polling, useless refreshing, so many things are conspiring to suck systems dry. Please, Mozilla, Firefox needs this too, ASAP!

    At work we use thin clients and a single site we must use just revamped their site and now is consuming about 1000% more CPU than it used to... and it does it all day long, continuously. Yes, it is bad programming, but it is not like we end-users have much of any control over it. We need options to control this on the CLIENT SIDE. I ask users now to PLEASE close that tab/site when not using it, but many have to use it all day long or just don't care.... it ultimately affects us all.

    1. Re:Foreground too, and all browsers, PLEASE by drainbramage · · Score: 1

      Reply to cancel accidental down mod. Very sorry.

      --
      No brain, no pain.
  44. So a scheduler? by Anonymous Coward · · Score: 0

    Seems like we keep "reinventing" OS mechanisms inside the browser...

  45. Oh dear. by Anonymous Coward · · Score: 0

    >(5) The only pages that appear to be exempt from the throttling are those that play audio.
    What could possibly go wrong?

  46. Do chrome developers ever use more than 10 tabs? by Anonymous Coward · · Score: 0

    Nice Idea, bad solution.

    "The budget regenerates with time (at rate of 0.01 seconds per second)."

    So clearly when you have 100 tabs the compound budget regenerates at 100 * 0.01 second per second == 1 second per second. Or in other words 100 tabs in the background will still use all your CPU.

    Also the tab I backgrounded last week cleary does not need to run timers as often (if at all, WTF is it still running?) as the page I backgrounded a minute ago. Clearly the regeneration rates should be flexible and age. Should be configurable globally and on a tab-by-tab level.

    Personally the first thing I would LOVE to see is a "stop timer" option in the tabs menu and an indicator which tab consumes all the cpu. Give me manual controll now and do the automatic later. A long time ago pressing "ESC" used to stop a page from playing anim-GIFs and such. Why not bring this back to stop timers on the current page?

  47. Dings 0.1% of the time by tepples · · Score: 1

    It is always wrong (ok, 99.9% of the time wrong) to have more than one context/page/plug-in instance in the browser play audio at a time

    Are you sure about that? I count on my mail tab to ding when I get mail, my voice tab to ring when a call is incoming

    If you get more than an average of 3.6 seconds of notification sounds per hour, then "99.9% of the time" they're not being played.

    1. Re:Dings 0.1% of the time by LunaticTippy · · Score: 1

      Touché. Another way to look at it would be "It is always fine to have more than one page play audio as long as the user wants to hear it."

      Reading other comments on this article it appears many people like to listen to lots of surprising stuff in background tabs.

      --
      Man, you really need that seminar!
    2. Re:Dings 0.1% of the time by tepples · · Score: 1

      Minor correction: There needs to be less than 3.6 seconds of notification audio per hour.