RESOLVED FIXED Bug 96224
Refactor SMILTimeContainer::updateAnimations to not do extra work
https://bugs.webkit.org/show_bug.cgi?id=96224
Summary Refactor SMILTimeContainer::updateAnimations to not do extra work
Philip Rogers
Reported 2012-09-09 21:05:46 PDT
SMILTimeContainer::updateAnimations is hot for users with many simultaneous animations and it contains some low hanging fruit for improving code readability and reducing unnecessary codepaths.
Attachments
Remove unnecessary codepaths in SMILTimeContainer::updateAnimations (17.36 KB, patch)
2012-09-09 21:12 PDT, Philip Rogers
zimmermann: review+
Patch for landing (17.44 KB, patch)
2012-09-10 14:10 PDT, Philip Rogers
webkit.review.bot: review-
pdr: commit-queue+
Lets try this again... (17.44 KB, patch)
2012-09-10 14:13 PDT, Philip Rogers
no flags
Philip Rogers
Comment 1 2012-09-09 21:12:18 PDT
Created attachment 163033 [details] Remove unnecessary codepaths in SMILTimeContainer::updateAnimations
Nikolas Zimmermann
Comment 2 2012-09-09 23:45:56 PDT
Comment on attachment 163033 [details] Remove unnecessary codepaths in SMILTimeContainer::updateAnimations Looks good, r=me!
Stephen Chenney
Comment 3 2012-09-10 13:53:19 PDT
Comment on attachment 163033 [details] Remove unnecessary codepaths in SMILTimeContainer::updateAnimations View in context: https://bugs.webkit.org/attachment.cgi?id=163033&action=review > Source/WebCore/svg/animation/SMILTimeContainer.cpp:249 > I would like to see an else on this asserting that the resultElement != animation. Because if it is equal, you may be adding it twice to the resultElements below. > Source/WebCore/svg/animation/SMILTimeContainer.cpp:251 > + if (animation->progress(elapsed, resultElement, seekToTime) && resultElement == animation) If resultElement was already animation at line 243 above, then we might be adding it again here. I think that here you should be checking accumulatedResultElement instead of resultElement == animation.
Philip Rogers
Comment 4 2012-09-10 14:03:14 PDT
Comment on attachment 163033 [details] Remove unnecessary codepaths in SMILTimeContainer::updateAnimations View in context: https://bugs.webkit.org/attachment.cgi?id=163033&action=review Thanks for the review schenney! >> Source/WebCore/svg/animation/SMILTimeContainer.cpp:249 >> > > I would like to see an else on this asserting that the resultElement != animation. Because if it is equal, you may be adding it twice to the resultElements below. An assert that this doesn't happen seems useful. Adding in new patch momentarily >> Source/WebCore/svg/animation/SMILTimeContainer.cpp:251 >> + if (animation->progress(elapsed, resultElement, seekToTime) && resultElement == animation) > > If resultElement was already animation at line 243 above, then we might be adding it again here. I think that here you should be checking accumulatedResultElement instead of resultElement == animation. I think the new assert from your other comment will cover this case without the extra bool.
Philip Rogers
Comment 5 2012-09-10 14:10:21 PDT
Created attachment 163206 [details] Patch for landing Thank you for the review Nikolas! Patch: off to the commit queue you go.
WebKit Review Bot
Comment 6 2012-09-10 14:11:53 PDT
Comment on attachment 163206 [details] Patch for landing Rejecting attachment 163206 [details] from review queue. pdr@google.com does not have reviewer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py. - If you do not have reviewer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. - If you have reviewer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your reviewer rights.
Philip Rogers
Comment 7 2012-09-10 14:13:30 PDT
Created attachment 163207 [details] Lets try this again... Oops--marked as r+ but I should have left review blank so it would pick up Niko's r+.
WebKit Review Bot
Comment 8 2012-09-10 17:07:05 PDT
Comment on attachment 163207 [details] Lets try this again... Clearing flags on attachment: 163207 Committed r128131: <http://trac.webkit.org/changeset/128131>
WebKit Review Bot
Comment 9 2012-09-10 17:07:08 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.