High CPU usage with duplicate inline background images

RESOLVED DUPLICATE of bug 1006353

Status

()

Core
Layout
RESOLVED DUPLICATE of bug 1006353
3 years ago
3 years ago

People

(Reporter: Geoffrey Knutzen, Unassigned)

Tracking

({perf, testcase})

30 Branch
x86_64
All
perf, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Created attachment 8465047 [details]
duplicate inline background images

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140605174243

Steps to reproduce:

In win7 or win8, open Firefox 30.0 and Windows task manager 
Note the CPU usage of Firefox. It should settle down to 0%.
Open the attached file /firefoxHatesKittens.html 
CPU usage should still settle to very low or 0%
Scroll down to the two pictures of the kitten.
Notice that CPU usage shoots up when both kittens are on the screen. 
Scroll away from the kittens, and CPU usage drops back down.

If you edit the html page to hide the second div and show the third div, the CPU problem goes away. It only happens when the same image is repeated and visible on the screen. 
Also, background-size: cover must be there.
And, the images must be included via style attributes to the dom elements. If they are included via normal CSS, there is no problem. 
Or if they are included via javascript, everything is fine.




Actual results:

I have seen upwards of 80% CPU usage on one windows 7 machine. I have tested this on other windows 7 and windows 8 machines. Most machines settle in at 7-30% CPU usage when both images are shown. There was one windows 8 machine that did not have a problem with this file.


Expected results:

static page should have extremely low cpu usage

Comment 1

3 years ago
Reproduced with 2014-08-04-03-02-05-mozilla-central-firefox-34.0a1.en-US.linux-x86_64 (compared with the picture 512/289, which also causes this when used twice, but not once).
QA Whiteboard: [bugday-20140804]
Component: Untriaged → Layout
Keywords: perf
OS: Windows 7 → All
Product: Firefox → Core

Comment 2

3 years ago
Interestingly, I can't reproduce this on mac. :-\
Keywords: testcase
This is the bug where we have the same image on screen with two different sizes and we continually downscale to the first size, then the second size, then the first size, etc. Mac doesn't have HQ downscaling enabled so that explains comment 2. This is certainly a dupe, but I don't have a bug number handy.
(Mac doesn't need HQ downscaling cause it does a good enough job without it.)

Comment 5

3 years ago
This one?
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1006353
You need to log in before you can comment on or make changes to this bug.