Bug 15339 - Use Vector<UChar> instead of DeprecatedString for innerHTML, for 35% speedup on CK DOM test
Summary: Use Vector<UChar> instead of DeprecatedString for innerHTML, for 35% speedup ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Maciej Stachowiak
URL: http://celtickane.com/projects/jsspee...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-02 00:26 PDT by Maciej Stachowiak
Modified: 2007-10-02 20:48 PDT (History)
0 users

See Also:


Attachments
the speedup described plus a few more micro-optimizations to innerHTML (34.87 KB, patch)
2007-10-02 00:58 PDT, Maciej Stachowiak
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stachowiak 2007-10-02 00:26:08 PDT
createMarkup() is the guts of innerHTML - the way it is implemented now leads to lots of conversion between DeprecatedString and String, and lots of random concatenation. It could be much faster to use a Vector<UChar> and build the whole string in that, and then use String::adopt to do the whole operation without excess conversions.
Comment 1 Maciej Stachowiak 2007-10-02 00:58:35 PDT
Created attachment 16498 [details]
the speedup described plus a few more micro-optimizations to innerHTML