Bug 15901

Summary: UString(const UString&, const UString&) mallocs too often
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: barraclough, darin, mjs
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.4   

Description Eric Seidel (no email) 2007-11-08 13:10:06 PST
UString(const UString&, const UString&) mallocs too often  (Or we simply call it too often)

UString(const UString&, const UString&)-caused fastmalloc's are bubbling up to the top of some samples.  It's more than 5% of string-validate-input.js (probably closer to 10 or more % if you count the entire cost of malloc)

I know that DeprecatedString does some smart buffer allocations which include space for future appends, etc.  I'm not sure if UString already does that.

A smarter solution here which avoided calling fastMalloc more often for string appends would be a win.
Comment 1 Alexey Proskuryakov 2011-05-16 23:17:46 PDT
Is this bug still valid?
Comment 2 Gavin Barraclough 2011-08-06 12:29:21 PDT
(In reply to comment #1)
> Is this bug still valid?

No.

:-)