-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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][broker] avoid creating new objects when intercepting #22790
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22790 +/- ##
============================================
- Coverage 73.57% 73.24% -0.34%
- Complexity 32624 32630 +6
============================================
Files 1877 1891 +14
Lines 139502 141617 +2115
Branches 15299 15542 +243
============================================
+ Hits 102638 103722 +1084
- Misses 28908 29873 +965
- Partials 7956 8022 +66
Flags with carried forward coverage won't be shown. Click here to find out more.
|
From the data you pointed out it doesn't see a big deal to have that instance, there are many other cases. |
Since BrokerInterceptor could execute in the message publish/consume calling chain, I think we should try our best to avoid object allocation. |
Otherwise, all the optimizations for memory/object allocation in the calling chain is meaningless: "It not a big deal to allocate objects/heap memories, let them GC" |
this is the point here. :) |
Motivation
When we do performance testing on the cluster. we find an issue which causes creates many small objects.
Modifications
Verifying this change
Documentation
doc
doc-required
doc-not-needed
doc-complete