Open Bug 1813309 Opened 1 year ago Updated 1 month ago

Investigate if avoiding ensureLinear call under CopyStringChars would improve performance

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

People

(Reporter: smaug, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [sp3])

This is from VanillaJS-TodoMVC
https://share.firefox.dev/3Jq2HrZ
Gecko side passes large enough buffer https://searchfox.org/mozilla-central/rev/4d2b1f753871ce514f9dccfc5b1b5e867f499229/dom/base/nsJSUtils.h#118,122 so one should be able to just copy string data there without flattening the rope.

Severity: -- → N/A
Priority: -- → P2
Whiteboard: [sp3]

This showed up again when profiling ES5 test of sp3.
https://share.firefox.dev/3Q85w4y

Starting Firefox and running the full Sp3 with the default harness, I see ~49500 calls to JS::detail::StringToLinearStringSlow (the function we end up calling for these JSAPI functions). In most cases (about 70%), the left child is another rope.

We should also try to avoid calling malloc for rope flattening. I filed bug 1880044 for that.

See Also: → 1880044
You need to log in before you can comment on or make changes to this bug.