Bug 242565 - make FontCascade refcounted to make style diffing cheaper when only color has changed
Summary: make FontCascade refcounted to make style diffing cheaper when only color has...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-07-09 23:09 PDT by Cameron McCormack (:heycam)
Modified: 2022-07-09 23:09 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron McCormack (:heycam) 2022-07-09 23:09:06 PDT
When the color property is being animated, an element will get a new StyleInheritedData, since that's where color lives.  The FontCasca object, which is moderately large, will be copied.  We can end up spending significant time under FontCascad::operator== under RenderStyle::changeRequiresLayout and RenderText::styleDidChange, comparing identical FontCascad objects.

Turning StyleInheritedData::fontCascade into a DataRef<FontCascade> would make comparison cheap when font style data is not changing.
Comment 1 Radar WebKit Bug Importer 2022-07-09 23:09:16 PDT
<rdar://problem/96788373>