WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
57843
Switch from Vector<UChar> to StringBuilder in dom/
https://bugs.webkit.org/show_bug.cgi?id=57843
Summary
Switch from Vector<UChar> to StringBuilder in dom/
Nikolas Zimmermann
Reported
2011-04-05 07:22:14 PDT
As discussed in
bug 56099
, we should deploy StringBuilder usage in WebCore where possible. This bug addresses Source/WebCore/dom.
Attachments
Patch
(5.95 KB, patch)
2011-04-05 07:24 PDT
,
Nikolas Zimmermann
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Nikolas Zimmermann
Comment 1
2011-04-05 07:24:13 PDT
Created
attachment 88225
[details]
Patch
Andreas Kling
Comment 2
2011-04-08 10:44:55 PDT
Comment on
attachment 88225
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=88225&action=review
> Source/WebCore/dom/DatasetDOMStringMap.cpp:124 > + builder.append(toASCIILower(characters[i]));
Why characters[i] and not character? And why do you need the local regardless?
Nikolas Zimmermann
Comment 3
2011-04-08 23:31:09 PDT
Comment on
attachment 88225
[details]
Patch Sorry Andreas, I should have removed r? before. As discussed with Maciej, he prefers to optimize operator+ instead of having to change all callsites that append just 2 strings. I'll look into that.
Nikolas Zimmermann
Comment 4
2011-05-12 07:58:12 PDT
Comment on
attachment 88225
[details]
Patch Marking patch for review again, now that 58420 is fixed. This patch is unrelated to the String operator+ optimization, and should go in as well. Maciej, can you have another look please? Vector<UChar> -> StringBuilder should be fine.
Darin Adler
Comment 5
2011-05-12 09:45:20 PDT
Comment on
attachment 88225
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=88225&action=review
>> Source/WebCore/dom/DatasetDOMStringMap.cpp:124 >> + builder.append(toASCIILower(characters[i])); > > Why characters[i] and not character? And why do you need the local regardless?
I agree with both comments. There is little benefit to using the local, but if we do use it we should use it in all three places.
Nikolas Zimmermann
Comment 6
2011-05-16 03:58:46 PDT
Thanks Darin, landed in
r86553
. Adressed Darin/Andreas comment in
r86555
regarding the local variable.
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