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.

15 of 122 comments (clear)

  1. Easy by Anonymous Coward · · Score: 3

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

  2. 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.

  3. 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 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. 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 l20502 · · Score: 2

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

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

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

  5. 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.

  6. 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.

  7. ^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).

  8. 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.

  9. "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 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.

  10. 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.