[Webkit-unassigned] [Bug 67079] Replace usages of Vector<UChar> with existing StringBuilder

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 9 10:21:27 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=67079





--- Comment #19 from Adam Barth <abarth at webkit.org>  2013-08-09 10:21:03 PST ---
(From update of attachment 106540)
View in context: https://bugs.webkit.org/attachment.cgi?id=106540&action=review

> Source/WebCore/rendering/InlineTextBox.h:42
> -typedef Vector<UChar, 256> BufferForAppendingHyphen;
> +
> +class BufferForAppendingHyphen : public StringBuilder {
> +public:
> +    BufferForAppendingHyphen() { reserveCapacity(256); }
> +};

Pre-allocating 256 characters in a StringBuilder is not nearly as efficient as reserving 256 characters of inline capacity in a Vector.  This change caused https://code.google.com/p/chromium/issues/detail?id=270678.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list