[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 11:19:45 PDT 2013


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





--- Comment #20 from Darin Adler <darin at apple.com>  2013-08-09 11:19:21 PST ---
(In reply to comment #19)
> (From update of attachment 106540 [details])
> 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.

Thanks for pointing that out. We should figure out what to do about this in WebKit.

-- 
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