-
Notifications
You must be signed in to change notification settings - Fork 531
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
optimize for protos containing large blobs #31
Comments
There's no support for this yet, but it should be possible to add. The 'plan' is to:
This solution unfortunately isn't too general - it only works with types known to |
Has anyone started on this? What does "specialization in the decoding stack" look like? |
Looking at it, using Or is the plan to provide some wrapper? |
@vorner I think |
Using |
As a container for string buffers backed by |
What is the advantage of using that over that |
@vorner I did not look at it in detail, but it seems, as a more generic container, it can't generally make use of some optimizations that are available for the specific |
Not directly applicable in prost, but the implementation of This can be bridged as well now that the impl of |
Hi all, on master this should be implemented on the deserialization side as of #387. The heavy lifting landed in #341, which added support for specifying that a .proto This is essentially what I laid out back in 2017, except instead of using a language specialization feature it uses a nifty specialized method built in to the As such, I'm going to close out this issue. If there are concerns or follow up requests please feel free to file a new issue. Thanks! |
One small optimization prost can do for proto message containing large blobs is - specialize decoding protobuf from reference counted buffers and give a reference to a slice of the underlying buffer as bytes instead of copying them. Similarly, when encoding the message simply chain these big blobs instead of copying them to output buffer. I think the C++ does this optimization for all
bytes
fields that specifyctype=cord
.The text was updated successfully, but these errors were encountered: