Closed Bug 987212 Opened 8 years ago Closed 8 months ago

Invisible gif (visibility: hidden) activates the refresh driver


(Core :: CSS Parsing and Computation, defect)

28 Branch
Windows 8.1
Not set





(Reporter: rvitillo, Unassigned)




(Keywords: power, Whiteboard: [Power:P2])


(2 files)

Idling on the vube homepage seems to consume significantly more energy than on IE and Chrome.
Attached file Testcase 1
The invisible gif in the testcase activates the refresh driver.
Component: General → CSS Parsing and Computation
Product: Firefox → Core
Summary: High power consumption on Vube homepage → Invisible gif (visibility: hidden) activates the refresh driver
Attached patch wipSplinter Review
Calling RegisterImageRequestIfAnimated/DeregisterImageRequests based on
the 'visibility' value seems to work.  Timothy, is this the right way
to go?
Attachment #8397402 - Flags: feedback?(tnikkel)
Comment on attachment 8397402 [details] [diff] [review]

This approach seems reasonable to me.
Attachment #8397402 - Flags: feedback?(tnikkel) → feedback+
Cleopatra (the profiler UI) hits this as well. It has a throbber image which gets displayed briefly, but continues to trigger the refresh driver since it's only hidden with visibility:hidden. (See bug 1004541.)
Blocks: 1004541
Mats: is this still relevant? Thanks.
Flags: needinfo?(mats)
Whiteboard: [Power]
Yeah, I think so.  I still see calls to nsRefreshDriver::AddImageRequest in a debugger
for the image in the testcase.  It looks like most of the patch would still apply
(I haven't tried applying it though).

Unfortunately, I don't have time to work on this for a while...
Perhaps seth@ or tn@ can take it from here?
Flags: needinfo?(mats)
Whiteboard: [Power] → [Power:P2]
See Also: → 1421325

Emilio, the testcase as attached doesn't reproduce a high load for me. In the case that this got fixed in the meantime we should be able to close this bug.

Flags: needinfo?(emilio)

I don't see anything off-hand that would've fixed this bug, but you're right that it seems fixed. Would be great to bisect it...

Flags: needinfo?(emilio)

Andrew landed some changes to stop updating animated images if the previous frame was never requested (ie painted) a while back (a few years?).

That would be bug 1454149.

Ah, sweet then :)

Closed: 8 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.