100% CPU usage due to invisible SMIL animations

NEW
Unassigned

Status

()

Core
SVG
P3
normal
a year ago
18 days ago

People

(Reporter: jst, Unassigned)

Tracking

({perf})

Trunk
Points:
---

Firefox Tracking Flags

(firefox52 wontfix)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

a year ago
I didn't get a chance to dig into what, but looking at a quick profile it seems we're running an animation on this page that ends up consuming tons of CPU time (in both Firefox and Chrome), yet nothing is visibly changing on the page (that I can see). Maybe there's an optimization opportunity here where we could avoid some work?

Comment 1

a year ago
Created attachment 8807890 [details]
reduced1 (no SVG animation)

Comment 2

a year ago
Created attachment 8807891 [details]
reduced2 (SVG animation)
As far as I can tell we have no such bug for SVG animation but we have already one for CSS animations/transitions or script animations. Bug 1237454.
See Also: → bug 1237454
I am going to re-use this bug as the one for SVG. This might be fixed once we integrate SMIL and web animations code in Stylo.
Component: Layout → SVG
Summary: 100% CPU usage due to invisible animation → 100% CPU usage due to invisible SMIL animation
Oops, I am sorry.  According to the test case in comment 1, animations on the site are not on visibility:hidden elements. Moving back to core::layout.
Component: SVG → Layout
OS: Linux → All
Hardware: x86_64 → All
Summary: 100% CPU usage due to invisible SMIL animation → 100% CPU usage due to invisible animations on elements which height or width is 0
Summary: 100% CPU usage due to invisible animations on elements which height or width is 0 → 100% CPU usage due to invisible animations on elements whose height or width is 0
Duplicate of this bug: 1320636
Mass wontfix for bugs affecting firefox 52.
status-firefox52: affected → wontfix
The animation in the test case in comment 1 is transform:rotate, it produces nsChangeHint_UpdatePostTransformOverflow, so even if the animation is scrolled out of view, it can't be throttled.  That's said, if the target frame height is zero (actually it's the test case), we can throttle it, as far as I can tell.
The slideshare case will be fixed by bug 1190721.
See Also: → bug 1409166
Moving into SVG since the CSS animation case in comment 1 has been solved by 1190721.
Component: Layout → SVG
Summary: 100% CPU usage due to invisible animations on elements whose height or width is 0 → 100% CPU usage due to invisible SMIL animations
Attachment #8807890 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.