Chromium Code Reviews
DescriptionRefactor StyleVariableData to fallback on root map.
A StyleVariableData object is a 'root' when it is constructed
empty rather than as a copy of another StyleVariableData. This
change points all derived StyleVariableData objects back to
their root, and delegates lookups rather than copying variable
values.
This is a performance motivated change. Adding custom properties
to a node used to require that the inherited properties object
from the parent node be copied. This coupled with a standard
practice of creating several hundred custom properties on the
root node resulted in expensive style recalculation (e.g. more
than 50ms on desktop to create 1000 child custom properties).
With this change incorporated, root node custom properties
always form a fallback dictionary that is never copied, so
creating 1000 child custom properties costs approximately
the same as creating none.
BUG=592770
Committed: https://crrev.com/816a8ffc2122e85bd9de4f5e0a30378170c7ca99
Cr-Commit-Position: refs/heads/master@{#386004}
Patch Set 1 #
Total comments: 15
Patch Set 2 : #Patch Set 3 : #
Messages
Total messages: 16 (7 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||