Javascript snowflakes cause Firefox 3.1 Beta 2 to use 100% CPU time.




10 years ago
6 months ago


(Reporter: geeknik, Unassigned)



Windows 7

Firefox Tracking Flags

(Not tracked)





10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2

I visited and noticed that on my Q9450 (4x 2.66ghz cores), Firefox 3.1 Beta 2 was using 100% of the CPU time on one of the cores.  When I minimize the browser, it drops down to about 25%. 

Reproducible: Always

Steps to Reproduce:
1. Visit
2. Open Task Manager
3. Watch Firefox 3.1 Beta 2 use 100% of the CPU
Actual Results:  
Firefox 3.1 Beta 2 uses 100% of the CPU.

Expected Results:  
Should not be using 100% of the CPU.
every year the same... probably a dupe of bug 64516
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 64516
Please do us all a favor and not mark performance bugs as duplicates unless you have a profile indicating that they really are, ok?  Just because both scripts move things around doesn't mean they do it the same way, and especially with tracemonkey very tiny changes in the script can mean big (factor of 10 or more) differences in performance.

Resolution: DUPLICATE → ---
Component: General → General
Product: Firefox → Core
QA Contact: general → general
OK, so on Mac we spend something like 60% of the time painting (about 50-50 backgrounds and text, with some other bits tossed in).  20% of the time is spent actually running the JS and setting .style.left and  5% of the time is restyles, and 3% is reflow.

Of course on Windows things might look different...

roc, do you think compositor would help here?

As far as triage goes, what would help most here is a self-contained testcase attached to this bug.
Keywords: qawanted

Comment 6

10 years ago
Just an FYI, the latest version of Chrome also uses about 80-90% of 1 core while displaying this page.  Latest version of IE7 uses about 15-20% of 1 core.
It's animating at 50 frames per second, which is fairly reasonable. So compositor probably wouldn't help here with the frame rate. Without some real debugging I can't tell if there are native widgets causing us to paint many times per frame.

Comment 8

10 years ago
Same behavior is seen with Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b3pre) Gecko/20081226 Shiretoko/3.1b3pre.
The layout debugger view/widget dump only shows two widgets...  Is that reliable?
Component: General → Layout: View Rendering
Ever confirmed: true
QA Contact: general → layout.view-rendering

Comment 11

10 years ago
Here's another example (same script, newer version) that causes the problem:

The script is actually located here:

I'm using Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b3pre) Gecko/20090108 Shiretoko/3.1b3pre.

Comment 12

10 years ago
My previous 2 links don't have the snowflakes on them anymore, but I did find a few more that are exhibiting the same problem with high CPU usage. - When the tab is active, CPU usage is 100%. When the tab is not active, CPU usage is minimal. - This script only uses about 50%-75% of the CPU while active. - uses 100% of the CPU while the tab is active.
See comment 3.  Basically, each page that has a performance problem needs to be profiled separately and needs its own bug, unless there is data to indicate that they are the same issue...

Comment 14

9 years ago
The original URL in this bug is no longer a valid test for this. I filed a new bug for the 1st URL in comment 12. I'm just going to dupe this one against bug 529977.
Last Resolved: 10 years ago9 years ago
OS: Windows Vista → Windows 7
Hardware: x86 → x86_64
Resolution: --- → DUPLICATE
Version: unspecified → Trunk
Duplicate of bug: 529977


6 months ago
Component: Layout: View Rendering → Layout: Web Painting
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.