Closed Bug 581607 Opened 14 years ago Closed 3 years ago

Animated Personas can cause a high cpu load

Categories

(Core :: Graphics: WebRender, defect)

defect
Not set
major

Tracking

()

RESOLVED WONTFIX
Tracking Status
blocking2.0 --- -

People

(Reporter: whimboo, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: perf, power, Whiteboard: [4b2])

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b2) Gecko/20100720 Firefox/4.0b2 Having an animated Personas (as the one given in the URL field) installed, the browser constantly has a cpu load of 40% on my dual core MBP. With Firefox 3.6 I only see a cpu load of 25%. People can also see this on other platforms. Steps: 1. Open task manager and check the cpu load of Firefox 2. Install or preview: http://www.getpersonas.com/en-US/persona/241274 After step 2 you should notice a drastic increase of the cpu load. It will be persist until you select another Persona or the default theme. Even those Personas are pretty neat, mobile users will be disappointed of short battery cycles and probably don't know what's causing it.
Whiteboard: [4b2]
Component: Theme → General
Product: Firefox → Core
QA Contact: theme → general
Do we end up repainting the entire window (including the content area) on every animation frame here or something?
blocking2.0: --- → ?
Keywords: regression
We can look into this, but frankly expecting decent battery life with an animated persona sounds misguided.
I can confirm that Firefox 4.0b3pre is much slower (25-30%) than Firefox 3.6 (18-20%) when using this theme. That's on Windows XP, dual core laptop.
On OS X Firefox 4.0 beta 2 uses 70% of my cpu. While starting to dig into the regression range finding, I have found that a big spike happened in builds between 20100211 and 20100216. I will further work on getting the changeset ids for the range. During that time Firefox has been used about 99% of the cpu. So we constantly are getting better.
Regression window is 2010021103 and 2010021207: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=af0f0615944e&tochange=4b18d31e83f4 Benjamin, could it be related to the IPC or Lorentz changes which have been checked in during this time frame?
Not obviously. You're of course welcome to make a smaller regression range if you think it will help. I suspect it would be easier to answer bz's question. I presume there aren't actually any plugins involved.
blocking2.0: ? → -

I installed an animated theme on latest Nightly 94.0a1 under Mac OSX 10.14. The CPU load was around 4%.
Henrik, do you think this load is acceptable to close this issue as WFM? Thank you!

Flags: needinfo?(hskupin)

Installing https://addons.mozilla.org/en-US/firefox/addon/animated-neutron-stars/ gives me around 15% of constant CPU load due to rendering.

Blocks: power-usage
Component: General → Graphics: WebRender
Flags: needinfo?(hskupin)
Keywords: regressionpower

That sounds quite reasonable. Clearly the theme is doing some heavy animation.

Here's a profile of having the theme from comment 8 installed: https://share.firefox.dev/3urfX7U

Markus, do you see anything actionable here? Most of the activity is in the Renderer thread, with also some activity in the main thread.

I wonder if this is wontfix. I'm hoping only a few users have an animated theme, and it makes sense that when repainting the chrome at 60Hz we use some CPU.

Flags: needinfo?(mstange.moz)

The profile seems quite reasonable to me. We're not compositing at a higher rate than needed, and each composite looks pretty cheap, with no obvious source of wastage. I agree that this bug can be closed.

Flags: needinfo?(mstange.moz)
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.