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

Use pooled memory for ToByteArray in C# #8321

Closed
jonso4 opened this issue Feb 20, 2021 · 1 comment
Closed

Use pooled memory for ToByteArray in C# #8321

jonso4 opened this issue Feb 20, 2021 · 1 comment
Labels

Comments

@jonso4
Copy link

jonso4 commented Feb 20, 2021

What language does this apply to?
If it's a proto syntax change, is it for proto2 or proto3?
If it's about generated code change, what programming language?

Describe the problem you are trying to solve.
ToByteArray in C# allocates a buffer for the message. This can lead to performance impact and heavy GC load at scale.

Describe the solution you'd like
It would be great if ToByteArray could use pooled memory to avoid allocations. It would be great if Grpc could also be updated to use this version of ToByteArray.

Describe alternatives you've considered
I have considered manually serializing the message with pooled memory, but this seems better handled by Protobuf itself.

Additional context
Add any other context or screenshots about the feature request here.

@elharo elharo added the c++ label Aug 26, 2021
@deannagarcia
Copy link
Member

Sorry for the long delay.

I think #7645 implemented this. Please file a bug with GRPC if you want changes on their end as well.

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

No branches or pull requests

3 participants