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
Improve new DefaultChannelId
#13960
Improve new DefaultChannelId
#13960
Conversation
|
Motivation: The instantiation process of DefaultChannelId presents opportunities for optimization. Modifications: Use the local stack when creating an instance. Employ `Unsafe`. Result: Enhanced Performance.
1X10X2, Intel(R) Xeon(R) Silver 4210 CPU @ 2.20GHz, openjdk 17.0.8 2023-07-18, Ubuntu 22.04.3 LTS, tuend network low-latency, no turbo boost. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Netty 5 I suspect we'll be better off to just assign instance fields (and bump the serialVersionUID
) instead of encoding a byte array.
I agree. That approach would be straightforward and could save resources by avoiding the assignment & calculation of constant values such as |
There still needs to be instance fields for those, because |
Thank you for clarifying that for me 👍 |
@chrisvest |
@jchrys Yes, please go ahead. |
Motivation:
The instantiation process of DefaultChannelId presents opportunities for optimization.
Modifications:
Use the local stack when creating an instance.
Employ
Unsafe
.Result:
Enhanced Performance.