After gaining a reputation for being a battery and CPU-heavy browser, Google has recently been streamlining Chrome for performance and endurance. In a post on the Chromium blog
this week, it unveiled its latest effort to make the browser less taxing on low-end hardware.
This time, Google is turning its attention to background tabs. If you switch away from a tab, it can currently keep on executing code as if it were in the foreground, even though it's not visible. Although Google already prevents background tabs from setting timers to run more than once
a second, the company said inactive websites still account for one third of Chrome's desktop power usage.
From version 57, a drastic change is being introduced in an attempt to reduce this statistic. Chrome will now individually monitor and throttle each background tab. Tabs will only be allowed a 1% CPU load at any given time. If a site begins to demand more resources, Chrome will automatically throttle it more aggressively, ensuring browser CPU load remains low.
This measure will allow the processor to focus on handling
code running in the active tab and other apps open on the machine, improving performance. The reduced CPU activity also leads to improvements in battery life, letting you keep multiple tabs open without fears of your laptop getting low on power. Google said that Chrome 57 reduces overall background tab activity by around 25 percent.
"Efficient power usage is an important aspect of speed, one of Chrome’s key pillars," said Google
. "To prolong battery life, Chrome should minimize power impact from things users can’t see. Starting in version 57, Chrome will throttle individual background tabs by limiting the timer fire rate for background tabs using excessive power."
Although the new policy applies to all tabs, sites can continue to run code in the background with full performance if they use modern mechanisms to request CPU time. Developers can use service workers, a feature of new browsers that lets sites continue to run code after they've been closed, to monitor for updates or take regular action without impacting performance.
Google still isn't done on its mission to improve Chrome's battery life. The browser vendor said it's working on additional systems which will be implemented in the future. In particular, it sees Chrome eventually moving to fully suspend all background tabs, preventing them running any code without the user's consent.
Service workers will be used as a modern, cross-browser solution to run code in the background. This change is still a long way off as a significant proportion of web users are unable to access a browser with service worker support.
Chrome 57 is available for download today. If you use Chrome as your default browser, it should have already updated. If it hasn't, you can manually install the new release by heading to the settings menu.