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

Avoid extra copy of deserialized data during a get within the router #322

Closed
pnarayanan opened this issue May 20, 2016 · 1 comment
Closed
Assignees

Comments

@pnarayanan
Copy link
Contributor

During a get, once the content is deserialized, MessageFormat returns an InputStream. In order to convert this to a ByteBuffer, the router has to do another copy today.

Instead, have MessageFormat return a ByteBufferInputStream (which is what it returns today anyway). And once #320 goes in, use the ByteBufferInputStream#getByteBuffer() to get a ByteBuffer out of the returned stream from MessageFormat.

See context here: https://github.com/linkedin/ambry/pull/308/files#r63651491

@pnarayanan pnarayanan self-assigned this May 20, 2016
@pnarayanan pnarayanan added this to the NonBlockingRouter milestone May 20, 2016
@pnarayanan
Copy link
Contributor Author

This is fixed. #320 has been merged, and #308 has been updated. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant