Bug 15339

Summary: Use Vector<UChar> instead of DeprecatedString for innerHTML, for 35% speedup on CK DOM test
Product: WebKit Reporter: Maciej Stachowiak <mjs>
Component: DOMAssignee: Maciej Stachowiak <mjs>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
URL: http://celtickane.com/projects/jsspeed2007.php
Attachments:
Description Flags
the speedup described plus a few more micro-optimizations to innerHTML oliver: review+

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