DescriptionAvoid copying the CachedUAStyle when possible
1.6% of the overall profile, and 2% of the recalcStyle, in the PeaceKeeper
benchmark is spent inside cacheUserAgentBorderAndBackground() because even
though there is an appearance guard on the constructor, we still run
constructors and destructors for all the members which aren't free since lots
of them have a lot of fields to initialize (ex. FillLayers and BorderData).
This patch moves the check from the constructor of CachedUAStyle into
cacheUserAgentBorderAndBackground() so that we can skip all the
initialization for the common case where the element has no appearance.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169408
Patch Set 1 #
Total comments: 1
Messages
Total messages: 17 (0 generated)
|