Bug 95304 - Improve string efficiency using StringBuilder and StringOperations
Summary: Improve string efficiency using StringBuilder and StringOperations
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-29 00:45 PDT by Adam Barth
Modified: 2012-08-30 09:59 PDT (History)
10 users (show)

See Also:


Attachments
Patch (8.65 KB, patch)
2012-08-29 00:46 PDT, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2012-08-29 00:45:16 PDT
Improve string efficiency using StringBuilder and StringOperations
Comment 1 Adam Barth 2012-08-29 00:46:17 PDT
Created attachment 161156 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-08-29 00:50:13 PDT
Comment on attachment 161156 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=161156&action=review

Looks reasonable.  AppleConvertedSpace is confusing.

> Source/WebCore/css/CSSLineBoxContainValue.cpp:60
> +            text.append(' ');

We should rename .append(UChar) to .appendUChar() or similar so that my brain can think simple thoughts like "append is slow".... here it's obviously not. :)
Comment 3 Benjamin Poulain 2012-08-29 00:57:39 PDT
> We should rename .append(UChar) to .appendUChar() or similar so that my brain can think simple thoughts like "append is slow".... here it's obviously not. :)

We should get rid of String::operator+=() and String::append() so that we can forget that "append is slow" :)
Comment 4 WebKit Review Bot 2012-08-29 04:16:25 PDT
Comment on attachment 161156 [details]
Patch

Clearing flags on attachment: 161156

Committed r126984: <http://trac.webkit.org/changeset/126984>
Comment 5 WebKit Review Bot 2012-08-29 04:16:29 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Darin Adler 2012-08-30 09:59:55 PDT
Looking at these patches and seeing how attractive people find +=, Iā€™m wondering if we should add a += operator to StringBuilder.