Closed Bug 379535 Opened 17 years ago Closed 13 years ago

Throttle setTimeout/Interval callbacks in content if callbacks are called too frequently (in background windows/tabs)

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mozbugs, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070502 Firefox/2.0.0.3 Flock/0.8.0.99
Build Identifier: 

I noticed this on http://abcnews.go.com/, they have a news ticker that is driven by animation code (http://a.abcnews.com/assets/js/animation.js), where they use a setTimeout of 10 ms to update the animation. Even while sitting in a background tab, the browser consumed 50% of CPU while idle.

To mitigate this, the browser could keep track of where and how often timeouts are scheduled, amd throttle down content that tries to schedule things too often.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Summary: Throttle setTimeout/Interval callbacks in content if callbacks are called too frequently in the background → Throttle setTimeout/Interval callbacks in content if callbacks are called too frequently (in background windows/tabs)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: DOM: Core → DOM: Core & HTML
QA Contact: ian → general
Depends on: 633421
Bug 633421 fixed this.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee: general → nobody
You need to log in before you can comment on or make changes to this bug.