[Webkit-unassigned] [Bug 67081] Basic enhancements to StringBuilder

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 8 20:48:10 PDT 2011


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


Xianzhu Wang <wangxianzhu at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #107317|0                           |1
        is obsolete|                            |
 Attachment #107317|review?, commit-queue?      |
               Flag|                            |
 Attachment #110288|                            |review?
               Flag|                            |




--- Comment #14 from Xianzhu Wang <wangxianzhu at chromium.org>  2011-10-08 20:48:09 PST ---
Created an attachment (id=110288)
 --> (https://bugs.webkit.org/attachment.cgi?id=110288&action=review)
patch v4

This patch removed toAtomicStringPreserveCapacity() because I think it's not reasonable to hold an over-allocated buffer in the atomic string table.

For toAtomicString() when the string value is already in the string table, there is no extra cost, except the last 'AtomicString(toStringPreserveCapacity())' whose cost is for String(stringImpl) or String(StringImpl::create(stringImpl, 0, m_length) which is small. I've tried to reduce that cost using a HashTranslator in AtomicString.cpp but it brought much complexity in the interface between AtomicString and StringBuilder. I can upload that patch if you prefer it.

The implementation of canShrink() should be tuned (will file another bug for it).

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