Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce `IpcBytesSender` and `IpcBytesReceiver` types for fast transfer of binary blobs. #50

Merged
merged 1 commit into from Mar 18, 2016

Conversation

@pcwalton
Copy link
Collaborator

pcwalton commented Mar 10, 2016

serde/bincode is very slow at serializing and deserializing
Vec<u8>, and shared memory involves too many syscalls (at least on the
Mac).

r? @jdm

@pcwalton pcwalton force-pushed the pcwalton:bytes-channel branch from 537bea9 to 9ae32c3 Mar 10, 2016
@pcwalton
Copy link
Collaborator Author

pcwalton commented Mar 10, 2016

Updated with tests.

ipc.rs Outdated
let index: usize = try!(Deserialize::deserialize(deserializer));
let os_receiver =
OS_IPC_CHANNELS_FOR_DESERIALIZATION.with(|os_ipc_channels_for_deserialization| {
// FIXME(pcwalton): This could panic. Return some sort of nice error.

This comment has been minimized.

@jdm

jdm Mar 10, 2016

Member

What would panic? The indexing? Could this comment be more explicit?

@jdm
Copy link
Member

jdm commented Mar 10, 2016

Otherwise this looks good to me.

@pcwalton pcwalton force-pushed the pcwalton:bytes-channel branch from 9ae32c3 to c2752e5 Mar 10, 2016
@pcwalton
Copy link
Collaborator Author

pcwalton commented Mar 10, 2016

Updated the comment and all of the corresponding comments in the file to be more precise. r? @jdm

transfer of binary blobs.

`serde`/`bincode` is very slow at serializing and deserializing
`Vec<u8>`, and shared memory involves too many syscalls (at least on the
Mac).
@jdm
Copy link
Member

jdm commented Mar 10, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Mar 10, 2016

📌 Commit c2752e5 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Mar 10, 2016

Testing commit c2752e5 with merge 5723e35...

bors-servo added a commit that referenced this pull request Mar 10, 2016
Introduce `IpcBytesSender` and `IpcBytesReceiver` types for fast transfer of binary blobs.

`serde`/`bincode` is very slow at serializing and deserializing
`Vec<u8>`, and shared memory involves too many syscalls (at least on the
Mac).

r? @jdm
@bors-servo
Copy link
Contributor

bors-servo commented Mar 10, 2016

💔 Test failed - travis

@jdm
Copy link
Member

jdm commented Mar 18, 2016

@bors-servo: retry

@bors-servo
Copy link
Contributor

bors-servo commented Mar 18, 2016

Testing commit c2752e5 with merge e222418...

bors-servo added a commit that referenced this pull request Mar 18, 2016
Introduce `IpcBytesSender` and `IpcBytesReceiver` types for fast transfer of binary blobs.

`serde`/`bincode` is very slow at serializing and deserializing
`Vec<u8>`, and shared memory involves too many syscalls (at least on the
Mac).

r? @jdm
@bors-servo
Copy link
Contributor

bors-servo commented Mar 18, 2016

☀️ Test successful - travis

@bors-servo bors-servo merged commit c2752e5 into servo:master Mar 18, 2016
1 of 3 checks passed
1 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.