Open
Bug 709644
Opened 13 years ago
Updated 2 years ago
don't tick SMIL animations as much when in a background tab
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
NEW
People
(Reporter: heycam, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: perf)
It should be possible to ensure SMIL animations do not tick as much when they are in a background tab page, for example it could only tick for times where the animation would be ending, causing other animations to start/end due to syncbase times, firing repeat events, etc. Script might be inspecting animated values in the DOM, so we'd need to ensure we could tick the animation if it is out of date when script does this.
Brian says we already keep a track of "significant milestones" in an animation, which might help.
![]() |
||
Comment 1•13 years ago
|
||
Is there a tick here separate from the refresh driver?
Comment 2•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #1)
> Is there a tick here separate from the refresh driver?
No. Animation samples are based off the refresh driver so we should benefit at least from throttling of the refresh driver. But this bug is about being more aggressive still. Perhaps we could skip samples altogether if:
a) we are in a background tab, and
b) we haven't reached the next milestone yet, and
c) we haven't add any explicit requests for a refresh (from SVG)
![]() |
||
Comment 3•13 years ago
|
||
I'm considering turning off the refresh driver altogether in background tabs, actually... I just need to convince roc. ;)
But even as it is, we do exponential backoff right now. So once a page goes in a background tab we set the refresh driver to 1s, and after N seconds have elapsed it won't tick more often than about every N seconds. Which means that in practice you don't get much ticking going on in background tabs.
Updated•13 years ago
|
Version: unspecified → Trunk
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•