-
Notifications
You must be signed in to change notification settings - Fork 725
avoid waker clones #3748
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
base: main
Are you sure you want to change the base?
avoid waker clones #3748
Conversation
Thanks for the PR, we'll have a look |
Spoke offline; we're going to look into requiring passing |
fa07eba
to
14cd3ed
Compare
updated |
bindings changed- needs merge conflicts addressed. |
13b6982
to
3317003
Compare
We have an internal application that uses s2n from different tasks (one for transmitting, one for receiving), and before this CR, this caused s2n to always clone the wakers and suffer from bad performance. This change notices that the transmitted context can always be passed down the stack, and improves performance in our case by about ~5%.
3317003
to
a2f4b0f
Compare
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
We have an internal application that uses s2n from different tasks (one for transmitting, one for receiving), and before this CR, this caused s2n to always clone the wakers and suffer from bad performance.
This change notices that the transmitted context can always be passed down the stack, and improves performance in our case by about ~5%.
If this is too ugly, maybe it is better to do it purely on our end by implementing a replacement to tokio-s2n-tls, but I'll rather use the common implementation and share the goodness.
This is unfortunately a breaking change to anyone that uses the previous waker API.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.