Allow IpcSharedMemory to support a take function that might be more efficient#433
Allow IpcSharedMemory to support a take function that might be more efficient#433sagudev merged 7 commits intoservo:mainfrom
Conversation
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
glyn
left a comment
There was a problem hiding this comment.
Any chance of adding a test(s)?
Also, I'd like to understand the context better. What are the non-development usecases for single process Servo?
|
Yes I can try to add a test. |
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
glyn
left a comment
There was a problem hiding this comment.
LGTM and thanks for the test.
How many bytes were copied? Presumably the time reduced from 117ms to 2.5ms? |
|
I don't have the report anymore and with the changes it would be a bit difficult to get the numbers again. |
IpcSharedMemory currently only supports deref to get the element out of it. This leads to a lot of potential copies.
On some platforms these copies seem to be unavoidable but for inprocess we can actually take the already allocated vector.
For an example in servo this decreases the overall time of copying bytes from roughly 2.5ms from 117ms.
Signed-off-by: Narfinger Narfinger@users.noreply.github.com