[Webkit-unassigned] [Bug 54707] Introduce lookup-table based approach for applying CSS properties.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 27 16:30:54 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=54707





--- Comment #78 from Luke Macpherson <macpherson at chromium.org>  2011-09-27 16:30:50 PST ---
Created an attachment (id=108928)
 --> (https://bugs.webkit.org/attachment.cgi?id=108928&action=review)
Shark trace of loading the HTML specification.

I've added a shark trace of the page load that Antti is talking about (http://www.whatwg.org/specs/web-apps/current-work/).

The sum of self samples in ApplyProperty*::apply* functions is about 2300.
The number of self samples in CSSStyleSelector::applyProperty is about 9100, 1200 of which are looking up and calling the apply property functions.

So CSSStyleSelector::applyProperty accounts for 7900 samples if the calls to CSSStyleApplyProperty are removed,
and CSSStyleApplyProperty and call sites account for 3500 samples in total.

Note:
~115 CSS properties are implemented in CSSStyleSelector::applyProperty
~145 CSS properties are implemented in CSSStyleApplyProperty
(disclaimer: I counted by hand and discarded things that were #ifdef-ed out etc).

I don't know the exact distribution of css properties used by this page, but it is reasonable to assume that CSSStyleApplyProperty is contributing a significant amount of the actual work done.

The data I'm seeing has not yet convinced me that this is a "massive regression in applyProperty, making it at least two times slower",
but I do agree that we could optimise this code further by refactoring to eliminate or reduce the use virtual functions.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list