Closed
Bug 1653027
Opened 5 years ago
Closed 2 months ago
Strings to be atomized should be allocated as atoms, not copied
Categories
(Core :: JavaScript: GC, enhancement, P3)
Core
JavaScript: GC
Tracking
()
RESOLVED
DUPLICATE
of bug 1713022
People
(Reporter: sfink, Unassigned)
References
(Blocks 2 open bugs)
Details
When I added the heap argument to all the string allocation APIs, I also made a handful of places pass through TenuredHeap when they were allocating a string that was going to be atomized. My logic was that there's no point in nursery allocating a string only to copy its data over to a (tenured, by construction) atom.
Except that atomization always copies over the data, so the net effect of the above "optimization" is to produce a bunch of short-lived protostrings in the tenured heap. (js::Atomize unconditionally calls AtomizeAndCopyChars; it cannot morph a string in-place.)
We should have APIs that allow allocating atoms directly.
Updated•1 year ago
|
Blocks: sm-runtime, sm-js-perf
Severity: S4 → N/A
| Reporter | ||
Comment 1•2 months ago
|
||
The strings I was talking about here were fixed in bug 1713022.
You need to log in
before you can comment on or make changes to this bug.
Description
•