Firefox Nightly seems to have an increase in CPU usage

RESOLVED WORKSFORME

Status

()

Core
Graphics
RESOLVED WORKSFORME
2 years ago
a year ago

People

(Reporter: beingalink, Unassigned)

Tracking

({perf, regression})

42 Branch
x86_64
Mac OS X
perf, regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: gfx-noted)

Attachments

(9 attachments)

(Reporter)

Description

2 years ago
Created attachment 8639237 [details]
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.
(Reporter)

Comment 1

2 years ago
Created attachment 8639239 [details]
safari.png
(Reporter)

Comment 2

2 years ago
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.
(Reporter)

Comment 4

2 years ago
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.
(Reporter)

Comment 5

2 years ago
Created attachment 8645340 [details]
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.

Comment 6

2 years ago
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)
(Reporter)

Comment 7

2 years ago
Created attachment 8645607 [details]
e10s_disabled+ublock_enabled.json.zip

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)
(Reporter)

Comment 8

2 years ago
Created attachment 8645608 [details]
e10s_enabled+ublock_disabled.json.zip
(Reporter)

Comment 9

2 years ago
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.
(Reporter)

Comment 10

2 years ago
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!

Comment 11

2 years ago
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
(Reporter)

Comment 12

2 years ago
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)
(Reporter)

Comment 13

2 years ago
I filed bug #1212858 for the broken safe mode. As soon as it's fixed, I'll try again.
(Reporter)

Comment 14

2 years ago
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.
(Reporter)

Comment 15

2 years ago
Created attachment 8675415 [details]
profile_spiegel.de_2015-10-18.json.zip
(Reporter)

Comment 16

2 years ago
There's no interaction at least for the last minute of above profile but the cpu usage is rising and rising.

Updated

2 years ago
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
Component: Untriaged → Untriaged
Ever confirmed: true
Product: Firefox → Core
Component: Untriaged → Graphics
(Reporter)

Comment 18

2 years ago
Created attachment 8697764 [details]
Gecko Profiler Output on http://blissfuljs.com/

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.
(Reporter)

Comment 19

2 years ago
Created attachment 8697794 [details]
Gecko Profiler Output on http://www.nytimes.com

Similar situation: Nothing going on but heavy cpu utilization. Same conditions as with my previous calls (flash deactivated, uBlock Origin).
(Reporter)

Comment 20

2 years ago
Exact url for previous comment: http://www.nytimes.com/2015/12/11/opinion/campaign-stops/goose-steppers-in-the-gop.html
(Reporter)

Comment 21

2 years ago
Created attachment 8697859 [details]
Gecko Profiler Output for spiegel.de

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)
(Reporter)

Comment 23

2 years ago
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)
(Reporter)

Comment 25

a year ago
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
Last Resolved: a year ago
Flags: needinfo?(beingalink)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.