Closed Bug 987212 Opened 11 years ago Closed 4 years ago

Invisible gif (visibility: hidden) activates the refresh driver

Categories

(Core :: CSS Parsing and Computation, defect)

28 Branch
x86
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: rvitillo, Unassigned)

References

()

Details

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

Attachments

(2 files)

Idling on the vube homepage seems to consume significantly more energy than on IE and Chrome.
Attached file Testcase 1 (deleted) —
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 wip (deleted) — Splinter Review
Calling RegisterImageRequestIfAnimated/DeregisterImageRequests based on the 'visibility' value seems to work. Timothy, is this the right way to go? https://tbpl.mozilla.org/?tree=Try&rev=f0f11f8c00dd
Attachment #8397402 - Flags: feedback?(tnikkel)
Comment on attachment 8397402 [details] [diff] [review] wip 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]

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 :)

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: