Closed
Bug 1041140
Opened 10 years ago
Closed 10 years ago
FakeString is badly designed
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: neil, Assigned: neil)
References
Details
(Keywords: memory-footprint, perf, regression)
Attachments
(1 file)
(deleted),
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
FakeString requires you to call SetCapacity(n + 1), SetLength(n), and then BeginWriting()[n] = char16_t(0). A real string does all this in one call to SetLength(n), and the calls to SetCapacity(n + 1) that are made on real strings could allocate more than necessary.
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Comment 2•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=37ba6f79c966
Comment 3•10 years ago
|
||
Comment on attachment 8459150 [details] [diff] [review] Proposed patch >+ if (aLength < sInlineCapacity) { > SetData(mInlineStorage); > } >+ else { else goes up next to the '}'. r=me with that, though this change will make bug 1025183 a bit more painful....
Attachment #8459150 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 4•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9350909a3401
Comment 5•10 years ago
|
||
Thanks Neil! It was on my list (needinfo) but I didn't get to it yet.
Comment 6•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9350909a3401
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•