Bug 10722

Summary: WebKit spends 5% of total time parsing WorldCup.svg in bad parsing code
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: SVGAssignee: Eric Seidel (no email) <eric>
Status: RESOLVED FIXED    
Severity: Normal Keywords: EasyFix
Priority: P4    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://websvn.kde.org/*checkout*/trunk/tests/ksvgtests/custom/worldcup.svg?rev=423294
Attachments:
Description Flags
Patch ignoring whitespace
aroben: review+
full patch none

Eric Seidel (no email)
Reported 2006-09-04 01:34:28 PDT
WebKit spends 5% of total time parsing WorldCup.svg in bad parsing code These two (misdesigned) lines in SVGPathParser::parseSVG() account for over 5% of total time: d = d.replace(',', ' '); d = d.simplifyWhiteSpace(); No need to do either. Just encoding that logic into the parser and do a single walk over the string would be much faster. Somewhere there is a darin thinking "i told you so..." ;)
Attachments
Patch ignoring whitespace (5.76 KB, patch)
2006-09-05 02:16 PDT, Eric Seidel (no email)
aroben: review+
full patch (26.97 KB, patch)
2006-09-05 02:16 PDT, Eric Seidel (no email)
no flags
Eric Seidel (no email)
Comment 1 2006-09-05 02:16:35 PDT
Created attachment 10398 [details] Patch ignoring whitespace
Eric Seidel (no email)
Comment 2 2006-09-05 02:16:57 PDT
Created attachment 10399 [details] full patch
Adam Roben (:aroben)
Comment 3 2006-09-05 20:16:47 PDT
Comment on attachment 10398 [details] Patch ignoring whitespace r=me, and ditto for the w/ whitespace patch, assuming there really are no other differences :-)
Note You need to log in before you can comment on or make changes to this bug.