Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: aa4a33e6bea441f0f89dab3926e2edadb0471c64
https://github.com/WebKit/WebKit/commit/aa4a33e6bea441f0f89dab3926e2edadb0471c64
Author: Nathan Solomon <[email protected]>
Date: 2025-12-23 (Tue, 23 Dec 2025)
Changed paths:
M Source/WebCore/animation/StyleOriginatedAnimation.cpp
M Source/WebCore/animation/StyleOriginatedAnimation.h
Log Message:
-----------
Optimize StyleOriginatedAnimation::cancel()
https://bugs.webkit.org/show_bug.cgi?id=303456
rdar://165741697
Reviewed by Antoine Quint.
StyleOriginatedAnimation::cancel is a hot path in SP3.
To optimize this function for cancellation events, skip evaluating the
conditions to decide how to enqueue the DOM event,
since we already know the parameters enqueueDOMEvent
needs. Most importantly, we do not need to call getComputedTiming()
to enqueue the cancel event. getComputedTiming() is the most
expensive part of calling invalidateDOMEvents, so skip this step.
A/B testing shows this is a performance improvement.
* Source/WebCore/animation/StyleOriginatedAnimation.cpp:
(WebCore::StyleOriginatedAnimation::setTimeline):
(WebCore::StyleOriginatedAnimation::cancel):
(WebCore::StyleOriginatedAnimation::computeCancelationTime const):
* Source/WebCore/animation/StyleOriginatedAnimation.h:
Canonical link: https://commits.webkit.org/304895@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications