RESOLVED FIXED 23317
[Regression] Very high CPU usage with animation testcase
https://bugs.webkit.org/show_bug.cgi?id=23317
Summary [Regression] Very high CPU usage with animation testcase
David Smith
Reported 2009-01-14 06:59:57 PST
Wave the mouse over the testcase (tested in r39882) and watch CPU usage, then compare doing the same in Safari 3.2.
Attachments
Testcase (639.98 KB, text/html)
2009-01-14 07:00 PST, David Smith
no flags
Shark trace (1.77 MB, application/octet-stream)
2009-01-14 07:02 PST, David Smith
no flags
Patch, including LayoutTest file (28.59 KB, patch)
2009-01-19 17:02 PST, Chris Marrin
hyatt: review+
David Smith
Comment 1 2009-01-14 07:00:46 PST
Created attachment 26707 [details] Testcase
David Smith
Comment 2 2009-01-14 07:02:31 PST
Created attachment 26708 [details] Shark trace
Chris Marrin
Comment 3 2009-01-19 17:02:38 PST
Created attachment 26853 [details] Patch, including LayoutTest file The high CPU usage was really from repeatedly firing transitions caused by a bug in the way we handle background-color animations. If animating from a valid background color to no background color, we sometimes left (based on timing) the background color as transparent black, but valid rather than invalid, which it should be. Fixing that got rid of the repeated firing. But we really were doing more expensive iteration of all objects with animations or transitions on them (running or not). So I added two optimizations to quickly short circuit when an object had no running animations or transitions. Things are now as zippy as ever.
Dave Hyatt
Comment 4 2009-01-21 12:53:11 PST
Comment on attachment 26853 [details] Patch, including LayoutTest file r=me
Chris Marrin
Comment 5 2009-01-21 17:11:03 PST
Sending LayoutTests/ChangeLog Adding LayoutTests/transitions/repeated-firing-background-color-expected.txt Adding LayoutTests/transitions/repeated-firing-background-color.html Sending WebCore/ChangeLog Sending WebCore/page/animation/AnimationBase.cpp Sending WebCore/page/animation/AnimationController.cpp Sending WebCore/page/animation/CompositeAnimation.cpp Sending WebCore/page/animation/CompositeAnimation.h Transmitting file data ........ Committed revision 40102.
Note You need to log in before you can comment on or make changes to this bug.