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

Allow large byte arrays in received messages to be allocated from ArrayPool #2592

Open
bill-poole opened this issue Feb 3, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@bill-poole
Copy link

I have a gRPC service that streams data from clients in a request stream, where each message is a chunk of data up to 1 MB. Currently, the gRPC library allocates a new array for each chunk, creating a lot of GC pressure, especially because the arrays are all allocated on the LOH. It would be great if we could configure the gRPC endpoint in ASP.NET to allocate those arrays from ArrayPool<byte>.Shared, rather than allocating new arrays. My endpoint logic would then be responsible for returning those arrays to the array pool when processing is complete.

@bill-poole bill-poole added the enhancement New feature or request label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant