With over 14 years experience supporting small business computer systems.

    Google is planning to add a new Chrome feature that could lead to drops of almost 30% in battery usage by throttling JavaScript timers in background tabs. With the introduction of this feature, Google aims to improve battery life for users on all six Blink platforms (desktop and mobile) including Windows, Mac, Linux, Chrome OS, Android, and Android WebView. The “Throttle Javascript timers in background” experiment can be enabled by Google Chrome Canary 86 users by opening a new chrome://flags/#intensive-wake-up-throttling tab, choosing Enabled in the drop-down menu, and restarting the web browser. Once the experiment is toggled on, Chrome Canary will begin automatically throttling JavaScript timers in all background tabs, directly impacting the app’s battery usage according to Google developers’ experiments. Background wake ups are already limited in Chrome to 1 second and 1% CPU but the new feature aims to limit Javascript timers to 1 single wake up per minute in pages hidden for 5 minutes.
    JavaScript timers throttling
    JavaScript timers throttling experiment
    “We used Devtools to inspect the work done by popular sites in the background. We found that a lot of work was done from Javascript timers,” Google says. “Furthermore, we found that the work done from these Javascript timers was often not valuable to the user when the page was backgrounded (e.g. checking if scroll position changed, reporting logs, analyzing interactions with ads). “Local experiments demonstrate that reducing the wake up rate of these Javascript timers can significantly improve the battery life,” the experiment’s explainer doc reveals. According to the explainer, the intensive throttling of JavaScript timer wakeups is only targeting web pages that don’t stop timers on visibilitychange events and those who haven’t switched to using modern APIs like MutationObserver, IntersectionObserver, or requestAnimationFrame instead of timers. Google’s experiments found that throttling Javascript timers aggressively leads to almost 2 hours (28%) more battery life for a user with 36 tabs and about:blank in the foreground and roughly 36 minutes (13%) more with a YouTube video playing in full-screen.
    Throttling Javascript timers experiment results
    Throttling Javascript timers experiment results (Google)
    The feature is planned to roll out and will be enabled by default to users of the Stable branch with the release of Google Chrome 86, with enterprise users to have access to an enterprise policy designed to force-enable or force-disable this intervention while the feature rolls out to Canary and Beta users.

    Other browser vendors are already shipping similar implementations, with Safari aligning timers on 40-seconds intervals instead of Google’s proposed 1-minute interval.

    “If experiments show that battery gains are similar with 40-seconds and 1-minute intervals, we could converge on the same intervals as Safari,” Google says.