Details
-
Type:
Improvement
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.20.0
-
Component/s: camel-core
-
Labels:None
-
Estimated Complexity:Unknown
Description
When some EIPs or consumer routes via AsyncCallback then we create a new AsyncCallback as anonymous inner class. But this creates a new instance as the JVM cannot optimize that.
As those callback don't usually have their own state, we can likely replace that with a single reusable instance which can reduce the memory allocation.
For example this TimerConsumer$3 can be optimized.