Summary: | Reduce usages of String::createUninitialized | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Annie Sullivan <sullivan> | ||||
Component: | Web Template Framework | Assignee: | Annie Sullivan <sullivan> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | abarth, eric, jamesr, simonjam, webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 66161 | ||||||
Attachments: |
|
Description
Annie Sullivan
2011-08-17 13:04:04 PDT
Created attachment 104219 [details]
Patch
If anyone has suggestions for performance benchmark tests to run before submitting, please comment. PerformanceTests/Parser has a good test for the html parser. I'm not sure if that test hits these codepaths or not. (In reply to comment #3) > PerformanceTests/Parser has a good test for the html parser. I'm not sure if that test hits these codepaths or not. Numbers from html-parser.html look similar before/after applying my patch. Before patch: avg 1605.3 median 1604 stdev 9.935290634903437 min 1594 max 1629 After patch: avg 1595.1 median 1592 stdev 6.579513659838393 min 1589 max 1609 Comment on attachment 104219 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=104219&action=review > Source/WebCore/html/parser/HTMLSourceTracker.cpp:59 > + int length = token.endIndex() - token.startIndex(); int => size_t probably There shouldn't be any perf impact. ReserveCapacity effectively does the same thing by pre-allocating the buffer. Comment on attachment 104219 [details] Patch Clearing flags on attachment: 104219 Committed r93281: <http://trac.webkit.org/changeset/93281> All reviewed patches have been landed. Closing bug. |