Closed Bug 1783240 Opened 2 years ago Closed 2 years ago

Automatically serialize large strings and numeric arrays using shared memory

Categories

(Core :: IPC, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
firefox107 --- fixed

People

(Reporter: nika, Assigned: nika)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(2 files)

This will involve both a copy into the shared memory region, and a copy out of it on the receiving side, however should still be reasonably efficient. This will avoid congesting the IPC pipe and help improve throughput in some cases.

This is similar to the BigString type used in chromium in some ways, however due to IPDL limitations it is automatic for all strings, rather than requiring explicit opt-in.

For efficiency in the case where we don't allocate a shared memory region, this will probably not actually use BigBuffer under the hood for the implementation, but will share many implementation details.

These aren't used anywhere, so can be removed, simplifying some things.

This changes and unifies the serialization strategy for types like
ns[C]String, nsTArray<T>, std::vector<T> etc such that they are all
serialized using a common implementation. For types which are trivial to
transfer with memcpy, they will automatically be serialized into a shared
memory region and copied out on the other side if its size exceeds 64k.

Depends on D153802

Blocks: 1781129
Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a4a31b1166e0 Part 1: Remove unnecessary `Log` methods from ParamTraits impls, r=ipc-reviewers,necko-reviewers,media-playback-reviewers,mccr8,alwu https://hg.mozilla.org/integration/autoland/rev/f194cdbd288a Part 2: Automatically serialize large blocks of binary data in shared memory, r=ipc-reviewers,jld
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
Regressions: 1794059
Blocks: 1800216
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: