Open Bug 1880044 Opened 4 months ago Updated 1 month ago

Support allocating flattened rope characters in the nursery

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

ASSIGNED

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [sp3])

Attachments

(4 files)

On a full Speedometer 3 run we call malloc about 200,000 times for rope flattening. Most of these (> 93% according to some quick-and-dirty logging) could instead allocate the buffer in the nursery.

This should be doable now after bug 1853907. I have a WIP patch that passes most tests, but it needs bug 1879918 to be fixed first.

See Also: → 1813309
Priority: -- → P2
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED

This was added when we calculated the size manually, but with mallocSizeOf
we don't need special handling for extensible strings.

Also fixes/deletes some outdated comments.

Now that strings can have nursery-allocated chars, we can also use this when
flattening nursery-allocated ropes.

Perf comparison: https://treeherder.mozilla.org/perfherder/comparesubtest?originalProject=try&newProject=try&newRevision=9176283ad4327fba0c64cf49d2890f7109bed210&originalSignature=4586009&newSignature=4586009&framework=13&application=firefox&originalRevision=355e7ae29a9ac994224f0fd963af5de86ebfdda6&page=1

Improves TodoMVC-JavaScript-ES5/Adding100Items/Sync by about 3.6%. Looking at the latest profile from Markus for this test, I do see some rope flattening time (under DOMParser.parseFromString and Template.prototype.show).

There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:jandem, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(sphink)
Flags: needinfo?(jdemooij)

Waiting for some other bugs to land first.

Flags: needinfo?(sphink)
Flags: needinfo?(jdemooij)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: