Closed Bug 1187859 Opened 9 years ago Closed 8 years ago

Firefox Nightly seems to have an increase in CPU usage

Categories

(Core :: Graphics, defect)

42 Branch
x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: beingalink, Unassigned)

References

Details

(Keywords: perf, regression, Whiteboard: gfx-noted)

Attachments

(9 files)

Attached image firefox_nightly.png
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0
Build ID: 20150726030217

Steps to reproduce:

Open firefox nightly 42.0a1 (2015-07-26) and load http://spiegel.de (media heavy news web site). Start scrolling the page up and down.

NB: Flash disabled, Macbook Core2Duo 2Ghz, NVIDIA GeForce 9400M 256 MB


Actual results:

CPU usage spikes really high: see attached image firefox_nightly.png


Expected results:

CPU is expected to spike but not as high. I did the same test with Safari and got a significant lower CPU usage.
Attached image safari.png
See safari.png for my results with Safari.
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86_64
Do you know if this is a recent regression? If you're able to check older versions of Firefox that would be helpful information.
I don't have the resources to test old builds. But I realize that this might be a problem with certain sites like spiegel.de. Sometimes such sites start to hog the cpu without any user interaction or sth special going on in the site (flash is disabled). Most of the time it's "Nightly Web Content" that uses 90+% CPU and doesn't go down anymore unless you close the tab.
Attached file profile.json.zip
I added a performance recording when being on spiegel.de to the attachments (profile.json.zip). The last 10-20 seconds I wasn't doing anything and flash is disabled. Perhaps it helps debugging the problem.
Can you reproduce with e10s disabled? Do you have extensions installed, e.g. adblock? I'm wondering if this could be bug 1161798.
Flags: needinfo?(beingalink)
I have e10s enabled and I'm using ublock. I did the same performance recording with e10s diabled + ublock enabled and e10s enabled + ublock disabled. In both cases I experience this high cpu usage which doesn't get down if I stop doing anything (at least 10 seconds at the end of each recording). The impact was worse when ublock was disabled though.
Flags: needinfo?(beingalink)
In the case of spiegel.de I might have found the culprit. It seems like firefox has issues handling the script https://script.ioam.de/iam.js . If I block it with uBlock Origin, the cpu consumption seems to behave much better. Perhaps someone can find out why firefox chokes on that script and doesn't bring up the unresponsive script warning with the possibility to kill execution.
OK, sorry. Seems like I spoke too soon. The problem that I get inexplicably high cpu usage that doesn't go down even though nothing is going on is still there. I have no idea what tool could help me find out where exactly the problem stems from. If anyone could give me a hint, I'd be grateful. Thanks in advance!
Do you see it also with Firefox started in safe mode??
 https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode
Flags: needinfo?(beingalink)
Keywords: perf
I'm unable to test in safe mode since it seems to be broken in current nightly. Nightly seems to load the content but doesn't display it. All I get is: https://www.dropbox.com/s/tcldrgu8kbl3ea2/Screenshot%202015-10-07%2020.06.24.png?dl=0
Flags: needinfo?(beingalink)
I filed bug #1212858 for the broken safe mode. As soon as it's fixed, I'll try again.
Since safe mode still doesn't work but the issue is still there and annoying, I attached a new performance profile when visiting spiegel.de: profile_spiegel.de_2015-10-18.json.zip. E10s is enabled, flash completely disabled, and the only addon I use is uBlock Origin.
There's no interaction at least for the last minute of above profile but the cpu usage is rising and rising.
Depends on: 1212858
Keywords: regression
I was able to reproduce on Mac 10.10, on the Nightly 45 - buildId 20151112030238, User Agent: Mozilla /5.0(Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Firefox 45.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Product: Firefox → Core
Component: Untriaged → Graphics
I attached Gecko profiler output. Active tab was http://blissfuljs.com/. I was away from the laptop for a while and when I came back the fans were spinning with modestly high cpu usage.
Similar situation: Nothing going on but heavy cpu utilization. Same conditions as with my previous calls (flash deactivated, uBlock Origin).
Attached a Gecko Profiler Output for spiegel.de.
Flags: needinfo?(bgirard)
Whiteboard: gfx-noted
That page has a CSS animation at the top. It might be responsible for the Power/CPU usage. The linked profile shows a bit of time spent painting, looks to be about 10 FPS.
Flags: needinfo?(bgirard)
This CSS animation must really be heavily unoptimized in firefox then. Visiting spiegel.de is a safe way to make my laptop's fans start spinning loud. Is there a way to disable only this animation on the site?
Does this still reproduce in the current Nightly?
Flags: needinfo?(beingalink)
http://spiegel.de has undergone a redesign recently and I can't reproduce the issue with current firefox nightly anymore. Not sure if the problem is fixed on firefox' side but at least I can't reproduce it anymore with this particular site.
WFM per comment 25
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(beingalink)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: