WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 90276
Optimize Element::getAttributeNS() by replacing String with AtomicString
https://bugs.webkit.org/show_bug.cgi?id=90276
Summary
Optimize Element::getAttributeNS() by replacing String with AtomicString
Kentaro Hara
Reported
2012-06-29 05:37:11 PDT
In
r121439
, we changed the argument type of Element::getAttribute() from String to AtomicString for optimization. We can also change the argument type of Element::getAttributeNS() from String to AtomicString. Actually this change affects V8 performance only. [JSC without the patch] The binding code converts a given JavaScript string to a String -> the String is passed to getAttributeNS() -> the String is converted to an AtomicString when it is passed to QualifiedName() constructor. [JSC with the patch] The binding code converts a given JavaScript string to a String -> the String is converted to an AtomicString when it is passed to getAttributeNS() -> the AtomicString is passed to QualifiedName() constructor. [V8 without the patch] The binding code retrieves a cached external String for a given JavaScript string -> the String is passed to getAttributeNS() -> the String is converted to AtomicString when it is passed to QualifiedName() constructor. [V8 with the patch] The binding code retrieves a cached external AtomicString for a given JavaScript string -> the AtomicString is passed to getAttributeNS() -> the AtomicString is passed to QualifiedName() constructor. In this way, in JSC, the change affects where a String is converted to an AtomicString. On the other hand, in V8, (since the AtomicString is already cached,) we can skip the conversion step.
Attachments
Performance test
(1.35 KB, text/html)
2012-06-29 05:38 PDT
,
Kentaro Hara
no flags
Details
Updated performance test
(1.36 KB, text/html)
2012-06-29 05:43 PDT
,
Kentaro Hara
no flags
Details
Patch
(4.11 KB, patch)
2012-06-29 05:44 PDT
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kentaro Hara
Comment 1
2012-06-29 05:38:20 PDT
Created
attachment 150156
[details]
Performance test
Kentaro Hara
Comment 2
2012-06-29 05:43:32 PDT
Created
attachment 150158
[details]
Updated performance test
Kentaro Hara
Comment 3
2012-06-29 05:44:36 PDT
Created
attachment 150159
[details]
Patch
Adam Barth
Comment 4
2012-07-27 01:05:18 PDT
Comment on
attachment 150159
[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.
WebKit Review Bot
Comment 5
2012-07-27 18:21:31 PDT
Comment on
attachment 150159
[details]
Patch Clearing flags on attachment: 150159 Committed
r123944
: <
http://trac.webkit.org/changeset/123944
>
WebKit Review Bot
Comment 6
2012-07-27 18:21:35 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug