Bug 102598

Summary: REGRESSION(r135021): Performance/DOM/CreateNodes ~9% slower.
Product: WebKit Reporter: Andreas Kling <kling>
Component: DOMAssignee: Andreas Kling <kling>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: kling, ojan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 102608, 102615, 102623    
Bug Blocks:    

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.