-
Notifications
You must be signed in to change notification settings - Fork 226
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
Rework as Bytes
-only payload
#473
Rework as Bytes
-only payload
#473
Conversation
I wonder if there is a way of optimising the write to not need to convert |
Performance regression at 100k small messages seems to be significant. This however does not mean that it will be so in real use. I would test it a little bit more in other environments. The real question is, how many Such a performance impact (10%) in a real-life high load example would be huge. Ten percent more load means ten percent more servers in the cluster and ten percent more hardware costs, and hardware is expensive. |
Actually I found we don't need to apply the mask then write, we have an |
Write performance looks good now
|
Spurred by the chat in tokio-rs/axum#3078 This PR experiments with simplifying the API to use only
Bytes
as payload. It does work pretty well,the only downside seems to be client->server write performance as masking requires mutating the bytes.Now fixed.Bytes
to avoid the overhead of having to mutate them.out_buffer
rather than in-place.