-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat(exchange): Add pre-allocating the buffer for reading in HeaderCodec #64
Conversation
311d80d
to
5ea68a5
Compare
|
c84340d
to
5ea68a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5809524
to
49cc72f
Compare
49cc72f
to
f18a99d
Compare
Co-authored-by: Yiannis Marangos <psyberbits@gmail.com>
Co-authored-by: Yiannis Marangos <psyberbits@gmail.com>
…nto feat/header-request-pre-alloc
d54791a
to
559569d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
closes #43
Read up to first 10 bytes (max length of the length delimiter varint) in a loop until prost::decode_length_delimiter is able to figure out message length. Then, when reading, preallocate the buffer and read the exact number of bytes needed.