BETA
This is a BETA experience. You may opt-out by clicking here

More From Forbes

Edit Story

The Chrome Browser Doesn't Drain Your Battery As Fast As It Used To

This article is more than 7 years old.

Credit: Geralt/Pixabay

Google’s Chrome dominates the desktop browser market. Nobody else is even close. While Chrome may be very successful, it has its fair share of problems, most noticeably, it’s a resource hog. Keeping web pages open in background tabs drains batteries and can markedly slow down overall performance. Google is doing something about that.

Google estimates that background tabs account for as much as a third of Chrome’s power usage. One of the main reasons why background tabs drain so much power is that web developers use JavaScript timers to update ad content and run analytics scripts. Chrome 57, which became available this week, is limiting this power drain by throttling background tabs that consume too much power.

Credit: Sports and Outdoors/YouTube

Here’s how Chrome’s new throttling system works. JavaScript timers chew up CPU cycles that take real time to carry out. (The real time it takes a function to execute is called “wall time”.) After a web page has spent 10 seconds in a background tab, it will be given a time budget measured in seconds of wall time. The Javascript timers will only be allowed to execute if there is time available in the tab’s budget. The budget is calculated so that, on average, a background tab will be able to use a maximum of 1% of a single CPU core.

When a timer executes, the wall time it took is subtracted from the tab’s budget. If the budget drops below zero, timers will be unable to execute until the budget is replenished. Time is added back to the budget at the rate of 0.1 seconds for every second of real time. Google claims this throttling system reduces background activity by 25%.

The consequences of throttling background tabs will not be the same for all websites. Social media and news sites tend to make heavy use of JavaScript timers and these sites will see the greatest effects. Background tabs that are playing audio or which use real-time, client-server connections like WebSockets and WebRTC will not be throttled.

Credit: Taken/Pixabay

Chrome 57 is not the end of Google’s efforts to make Chrome more power friendly. In the second quarter of 2017, they plan to suspend all timers on background tabs on mobile devices after five minutes, and begin throttling other functions in addition to timers. If everything goes according to plan, all activity in a background tab will be suspended after N minutes in 2018. Web developers will be able to opt out of this constraint. In 2020, the option to opt out will be eliminated.

Chrome 57 is available now. Click on “About Google Chrome” under ”Help” under “Customize and control Google Chrome” (the three vertical dots on the right side of the browser bar). If you have an earlier version of Chrome, it will immediately begin updating to Chrome 57.

Follow me on Twitter or LinkedInCheck out my website