JavaScript timer throttling helps Chrome save up to 28% battery life

Posted on Wednesday, July 08 2020 @ 14:45 CEST by Thomas De Maesschalck
GOOG logo
These days web browsers are likely the most-used piece of software on laptops. Making a browser more energy efficient can have major benefits so Chrome users will be happy to hear about a new feature Google is experimenting with.

The latest Canary build of Google Chrome features a setting called "Throttle Javascript timers in background", it basically cuts down JavaScript processing that normally happens in background tabs. By enabling this feature, Chrome will pauze JavaScript timers for tabs that have been in the background for more than five minutes, with wake-ups limited to once per minute. These timers are often user to track user interaction with a website.

So how much battery life can be gained by throttling these timers? Quite a lot if seems. With 36 tabs in the background and a YouTube video in the foreground, Google discovered battery life increased from the baseline of 4.7 hours to 5.3 hours on their test system (a 2018 15-inch Macbook Pro). When the foreground was about:blank instead of a YouTube video, battery life increased from 6.4 hours to 8.2 hours!

However, even Google acknowledges that Apple's Safari still scores better:
The flag in Canary links to a load of documentation detailing Google's test runs with this new feature. For the first test, the company grabbed a 2018 15-inch Macbook Pro and loaded up 36 background tabs with a blank foreground tab, then let the laptop run until it died. With throttling on, the laptop lasted two hours longer, or 28 percent longer, than the default settings. That's a huge improvement, but it still can't get Chrome up to the level of Apple's Safari, which bested Chrome by three hours with the default settings and by one hour with the new throttling flag.
JavaScript Throttling in Chrome

Via: ARS Technica


About the Author

Thomas De Maesschalck

Thomas has been messing with computer since early childhood and firmly believes the Internet is the best thing since sliced bread. Enjoys playing with new tech, is fascinated by science, and passionate about financial markets. When not behind a computer, he can be found with running shoes on or lifting heavy weights in the weight room.



Loading Comments