Chrome Plans to Limit the Activity of Background Tabs to Improve Performance

Jack

Administrator
Thread author
Verified
Staff Member
Well-known
Jan 24, 2011
9,378
Google Chrome engineers are working on a throttling system that would impose a limitation on the number of JavaScript (timers) operations that unfocused background tabs can perform.

According to Google, this would reduce the CPU usage coming from Chrome's background tabs, indirectly improving the browser's performance and the device's battery life.

Google takes on overburdening, excessive JavaScript timers
This new mechanism is explained in a two-page document and discussed further on the Google Chrome discussions group.

The document refers to JavaScript timers, which are exactly what you think they are, countdown timers implemented in JavaScript code.

With the rise of real-time web-based applications, JavaScript timers have become indispensable, allowing developers to trigger actions at specific times or schedule recurring operations, such as checking for new messages in email inboxes and chat clients, refreshing pages automatically, and more.

Unfortunately, many web developers have abused this feature and overloaded pages with timers that often trigger and run seemingly non-stop.

According to Google, this has led to some situations where one Chrome background tab was consuming up to 20% of the device's memory.

Background tabs will work on a "time budget"
To fend off the abuse of JavaScript timers, Google engineers plan to limit the access of background tabs to Chrome's JavaScript processing engine.

The way they plan to do this is by using a "time budget" for each tab, which can exhaust if the background tab triggers too many timers. The proposed throttling mechanism, as described by Google engineer Alexander Timin, is as follows:

  • Each WebView has a budget (in seconds) for running timers in background.
  • A timer task is only allowed to run when the budget is non-negative.
  • After a timer has executed, its run time is subtracted from the budget.
  • The budget regenerates with time (at rate of 0.01 seconds per second).
According to Timin, the main motivation to implement such system is to counteract JavaScript ads and analytics scripts that are often the source of many of these timers.

Read more: Chrome Plans to Limit the Activity of Background Tabs to Improve Performance
 

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top