Bug 207435 - Optimize style resolution for animations
Summary: Optimize style resolution for animations
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-08 16:59 PST by Simon Fraser (smfr)
Modified: 2020-02-08 17:26 PST (History)
4 users (show)

See Also:


Attachments
Animation test (980 bytes, text/html)
2020-02-08 16:59 PST, Simon Fraser (smfr)
no flags Details
Testcase (1.04 KB, text/html)
2020-02-08 17:01 PST, Simon Fraser (smfr)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2020-02-08 16:59:57 PST
Created attachment 390186 [details]
Animation test

Animations (both old and new) currently invalidate style on the element every frame, which triggers a full TreeResolver::resolve() which is expensive. In the attached testcase, TreeResolver::resolve() is 14% of CPU time.

We should optimize style resolution with a type of invalidation for animations.
Comment 1 Simon Fraser (smfr) 2020-02-08 17:01:51 PST
Created attachment 390187 [details]
Testcase
Comment 2 Simon Fraser (smfr) 2020-02-08 17:26:24 PST
With 500 animating elements, style resolve time exceeds paint time.
Comment 3 Radar WebKit Bug Importer 2020-02-08 17:26:41 PST
<rdar://problem/59290089>