[webkit-reviews] review requested: [Bug 67081] Basic enhancements to StringBuilder : [Attachment 110288] patch v4

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


Xianzhu Wang <wangxianzhu at chromium.org> has asked  for review:
Bug 67081: Basic enhancements to StringBuilder
https://bugs.webkit.org/show_bug.cgi?id=67081

Attachment 110288: patch v4
https://bugs.webkit.org/attachment.cgi?id=110288&action=review

------- Additional Comments from Xianzhu Wang <wangxianzhu at chromium.org>
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).


More information about the webkit-reviews mailing list