WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
221344
Optimize Styleable::elementWasRemoved()
https://bugs.webkit.org/show_bug.cgi?id=221344
Summary
Optimize Styleable::elementWasRemoved()
Simon Fraser (smfr)
Reported
2021-02-03 10:59:17 PST
AnimationTimeline::elementWasRemoved() shows up as hot in Speedometer since Element::removedFromAncestor() is called a lot. I see removals with both idle and active animations (color transitions). WebCore::Element::removedFromAncestor(WebCore::Node::RemovalType, WebCore::ContainerNode&) WebCore::AnimationTimeline::elementWasRemoved(WebCore::Styleable const&) WebCore::DeclarativeAnimation::cancel(WebCore::WebAnimation::Silently) WebCore::WebAnimation::cancel(WebCore::WebAnimation::Silently) WebCore::AnimationEffect::getBasicTiming(WTF::Optional<WTF::Seconds>) const WebCore::AnimationEffect::getBasicTiming(WTF::Optional<WTF::Seconds>) const::$_0::operator()() const WebCore::WebAnimation::currentTime(WTF::Optional<WTF::Seconds>) const WebCore::WebAnimation::currentTime(WebCore::WebAnimation::RespectHoldTime, WTF::Optional<WTF::Seconds>) const WebCore::DocumentTimeline::currentTime() WTF::fastMalloc(unsigned long) bmalloc::api::malloc(unsigned long, bmalloc::HeapKind) bmalloc::Cache::allocate(bmalloc::HeapKind, unsigned long) WebCore::WebAnimation::effect() const WebCore::DeclarativeAnimation::invalidateDOMEvents(WTF::Seconds)
Attachments
Add attachment
proposed patch, testcase, etc.
Antoine Quint
Comment 1
2021-02-04 05:37:10 PST
We should look into caching basic and computed timing, but we'll have to be careful here because their output can vary when any timing property is changed, not just the timeline time. However, in the process of an animation simply running after initial setup without any change made via CSS or the JS API, which should be the vast majority of cases, we might be able to see some gains here. I also think that kind of optimization would show immediate regressions in WPT tests in case something went wrong.
Radar WebKit Bug Importer
Comment 2
2021-02-10 11:00:34 PST
<
rdar://problem/74196202
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug