Serialize ByteBuf using Write/ReadSequenceParam
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Tracking
()
People
(Reporter: nical, Assigned: nical)
References
(Blocks 1 open bug)
Details
I am told it involves less copies than WriteBytes/ReadBytesInto.
Assignee | ||
Comment 2•2 years ago
|
||
Quoting Nika:
If the buffer is a sequence of trivial numeric types, and the length is over 64k bytes, it [WriteSequenceParams] allocates a temporary shared memory region and sends that instead.
WriteBytes copies the data into the IPC::Message's buffer, and then that is copied into a system pipe, the nout of it into another IPC::Message, and then finally read into your final thing. IPC::Message uses a BufferList right now, meaning that it serilizes data into 4k chunks
Comment 3•2 years ago
|
||
Are there benchmarks that show the advantages of the shared memory approach?
Assignee | ||
Comment 4•2 years ago
|
||
Talos tests don't seem to be affected by the change:
- https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=3478f4cb30eb75575e8fd338cea5029c7f09127a&newProject=try&newRevision=1b07ad0f6b70665a33f85f86f4405ee0f4b84c83&framework=1&page=1
- https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=4e6b698022fbdbc823225483715b2e9f6fb34551&newProject=try&newRevision=8bc537a5ca24898eb339531d8bdb3eb6b7fcc9e8&framework=1&page=1
Quoting Mika again:
if the display lists tend to be under 64k it probably won't change much at all
Comment 5•2 years ago
|
||
Nope, there aren't really any major benchmarks showing improvements there. It's mostly a lever to consider pulling if we think we'll see performance improvements from the change due to seeing the existing memcpys in profiles.
I think for extremely large messages (megabytes) we could see some improvements, but I wouldn't expect to see much change at all for reasonably sized messages.
Assignee | ||
Updated•6 months ago
|
Description
•