Closed Bug 1904328 Opened 1 year ago Closed 1 year ago

Share string buffer when passing JS strings between zones

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(2 files)

Non-atom strings belong to a single zone and are copied when passed to other zones. For strings with a shared StringBuffer, we can instead allocate a new JS string that shares the underlying buffer.

Strings with string buffers aren't that common yet, but this will change as we start using them more.

Severity: -- → N/A
Priority: -- → P1
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c4a5e8d94644 part 1 - Remove chars argument from new_/newValidLength functions. r=sfink https://hg.mozilla.org/integration/autoland/rev/2a9c086e4781 part 2 - Optimize CopyStringPure to share StringBuffer if possible. r=sfink
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
Whiteboard: [sp3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: