[improve][broker] avoid creating new objects when intercepting - #22790
Conversation
Codecov Report❌ 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.
🚀 New features to boost your workflow:
|
|
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
docdoc-requireddoc-not-neededdoc-complete