How this one Chrome OS change could boost Chromebook browsing battery life up to 28%

I’ve long wondered why laptop browsing battery tests for Chrome have been relatively poor when compared to other browsers. Now I have an idea of why that is, and more importantly, what Google is planning to do about it. One very small change to Chrome OS in the near future could boost the battery life of when browsing on a Chromebook by 28 percent based on internal testing by Google.

The Windows Club caught word of the change over the weekend but didn’t share any links to the change nor the research. Some digging around in the Chromium code repository provided me with the details of the change, entitled “Throttle Javascript timers to 1 wake up per minute in background.

The title itself gives you an idea of the code improvement, although to fully understand it you’d need to know that today, Chrome OS lets background Javascript timers run one time per second. Changing this timer to once per minute reduces timer wakes and calls from 60 per minute to just a single one on background web pages and tabs.

Here are the results from some early internal testing using 36 different tabs and sites to represent a beefy browsing experience using Chrome on a Mac.

You can see that in this particular case, battery life via Chrome is much closer to that of Safari.

This change will first be an experimental feature hidden behind a flag that appears to be called “expensive-background-timer-throttling” at the moment. Since this code is still being worked on, that could change by the time implementation rolls around. And since Google likes to provide Chrome Admins with controls in the enterprise, the current plan is to create a new, but temporary, policy to allow administrative control:

An enterprise policy will allow system administrators to disable the intervention. The goal is to provide an escape hatch to prevent breakages when this intervention ships to stable. The enterprise policy will be retired 1 year after the feature ships to stable, as it is expected that Web apps will be updated to not rely on frequent wake ups from Javascript timers in background.

If you’re a web developer or simply interested in more of the testing and code details, Google has a publicly available document on its thought process, testing methodology, and implementation plans here.

5 thoughts on “How this one Chrome OS change could boost Chromebook browsing battery life up to 28%

  • July 6, 2020 at 1:49 pm
    Permalink

    It’s likely that when these Javascript timers were set up, someone did it based on the assumption that users would likely very, very seldom have more that twenty tabs open concurrently, and typically only four or five. From what I surmise from reading various posts is that quite a large number of users expect to have between 50 and 100 tabs open concurrently most of the time while also running on battery. To avoid provoking retribution, I’ll bite my tongue and withhold judgement on the expectations of those users.

    Reply
    • July 6, 2020 at 8:06 pm
      Permalink

      50-100? In a chromebook? On battery? Yikes. I rarely have more than (counts…) 25 or so. In Chrome. Usually another 4 in Firefox, and 5 in Edge (new). On the desktop. ON a chromebook, I don’t usually have more than 5 persistent tabs.

      Reply
  • July 6, 2020 at 4:29 pm
    Permalink

    The setting is available in Canary. A slightly different wording but obviously that can change.
    It requires a machine reboot not just a restat of the browser.

    Throttle Javascript timers in background.
    When enabled, wake ups from DOM Timers are limited to 1 per minute in a page that has been hidden for 5 minutes. For additional details, see https://www.chromestatus.com/feature/4718288976216064. – Mac, Windows, Linux, Chrome OS, Android

    #intensive-wake-up-throttling

    Reply
    • July 6, 2020 at 4:32 pm
      Permalink

      Oooh! Good to know that it can be tested in Canary now – thanks!

      Reply
  • July 6, 2020 at 4:49 pm
    Permalink

    I think this will be a great improvement. Although I do not often run the battery down to zero, it will help with battery anxiety as the day goes along. Any idea what Version it will b
    .
    .
    .
    .
    *

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.