You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2017/05/26 17:16:04 UTC

[jira] [Created] (CAMEL-11347) Optimize AsyncCallback in EIPs to use reusable static classes

Claus Ibsen created CAMEL-11347:
-----------------------------------

             Summary: Optimize AsyncCallback in EIPs to use reusable static classes
                 Key: CAMEL-11347
                 URL: https://issues.apache.org/jira/browse/CAMEL-11347
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
            Reporter: Claus Ibsen
             Fix For: 2.20.0


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. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)