Bug 90274 - Optimize Element::getAttributeNode() by replacing String with AtomicString
Summary: Optimize Element::getAttributeNode() by replacing String with AtomicString
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords:
Depends on:
Blocks: 90246
  Show dependency treegraph
 
Reported: 2012-06-29 05:16 PDT by Kentaro Hara
Modified: 2012-08-07 19:41 PDT (History)
4 users (show)

See Also:


Attachments
Performance test (1.56 KB, text/html)
2012-06-29 05:20 PDT, Kentaro Hara
no flags Details
Patch (3.25 KB, patch)
2012-06-29 05:24 PDT, Kentaro Hara
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kentaro Hara 2012-06-29 05:16:19 PDT
Based on the observation described in this ChangeLog (http://trac.webkit.org/changeset/121439), the performance of Element::getAttributeNode() can be optimized by replacing String with AtomicString.
Comment 1 Kentaro Hara 2012-06-29 05:20:24 PDT
Created attachment 150147 [details]
Performance test
Comment 2 Kentaro Hara 2012-06-29 05:24:15 PDT
Created attachment 150148 [details]
Patch
Comment 3 Adam Barth 2012-07-27 01:05:04 PDT
Comment on attachment 150148 [details]
Patch

Based on further discussion in #webkit, my current understanding is that ap is ok with these patches.  I'm going to r+ them, but please give ap a chance to respond before landing.
Comment 4 Darin Adler 2012-07-27 07:08:36 PDT
Comment on attachment 150148 [details]
Patch

This is faster in some cases. But a case Iā€™d expect this makes slower is when the passed-in attribute name is uppercase. This adds a lookup in the atomic string table of the not-yet-lowercased string.
Comment 5 Kentaro Hara 2012-08-07 18:21:59 PDT
Comment on attachment 150148 [details]
Patch

Looks like no strong objection, let me commit it.
Comment 6 WebKit Review Bot 2012-08-07 19:41:36 PDT
Comment on attachment 150148 [details]
Patch

Clearing flags on attachment: 150148

Committed r124972: <http://trac.webkit.org/changeset/124972>
Comment 7 WebKit Review Bot 2012-08-07 19:41:40 PDT
All reviewed patches have been landed.  Closing bug.