Bug 102598 - REGRESSION(r135021): Performance/DOM/CreateNodes ~9% slower.
Summary: REGRESSION(r135021): Performance/DOM/CreateNodes ~9% slower.
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
Depends on: 102608 102615 102623
  Show dependency treegraph
Reported: 2012-11-17 14:35 PST by Andreas Kling
Modified: 2013-02-16 16:16 PST (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2012-11-17 14:35:54 PST
Looks like http://trac.webkit.org/changeset/135021 regressed Performance/DOM/CreateNodes by ~9%.

I'd like to make up for this regression somehow without reinstating the original optimization since it wasn't very future-proof.
Comment 1 Andreas Kling 2012-11-17 14:37:07 PST
> Copying my comment from bug 101163 here:

Hrmf. I was afraid that might happen. I couldn't prove that it was slower on my machine, but the test is taking a slightly slower path when cloning the style attribute now.

We used to have an optimization to bypass the whole Element::attributeChanged() virtual dispatch for HTMLNames::styleAttr when cloning attributes and just call StyledElement::styleAttributeChanged() directly. 

While the main purpose of this was to dodge the reparsing of the inline CSS, it also avoided some things that I'm not entirely sure are OK to skip, notably DOM tree version revving and node lists invalidation. Not to mention that the code wasn't very future-proof since anything added to attributeChanged() in the future would also get skipped for style attributes.
Comment 2 Andreas Kling 2013-02-16 16:16:08 PST
Nothing happening here, and the regression was more than covered up for since.