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

Can I use direct memory pool for ByteString #9704

Closed
coffee-core opened this issue Nov 21, 2022 · 2 comments
Closed

Can I use direct memory pool for ByteString #9704

coffee-core opened this issue Nov 21, 2022 · 2 comments
Labels

Comments

@coffee-core
Copy link

Is there way to hook up a callback from grpc after each message is sent done? Or it could be after the data is serialized to a different memory space.
I am trying to use Netty's DirectByteBuf for Created ByteString(use UnsafeByteOperations#unsafeWrap(ByteBuffer)) in the msg object and want to release those for reuse after the transmission is done.
Also, I'm wondering if it's possible to achieve zero-copy when sending messages if I do this.

@ejona86
Copy link
Member

ejona86 commented Nov 22, 2022

There's a way to do this for receiving, but nothing for sending.

There's been plenty of conversation around this, but it isn't a simple issue. Take a look at #1054, maybe starting somewhere near #1054 (comment) . I honestly don't remember how unclear an approach is for sending.

@ejona86
Copy link
Member

ejona86 commented Dec 20, 2022

Closing as a duplicate of #1054.

@ejona86 ejona86 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants