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/27 08:02:04 UTC

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

     [ https://issues.apache.org/jira/browse/CAMEL-11347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-11347.
---------------------------------
    Resolution: Fixed
      Assignee: Claus Ibsen

The EIPs are harder to optimize as they need local scoped access to instances which we cannot do from a shared singleton class.

> 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
>            Assignee: Claus Ibsen
>             Fix For: 2.20.0
>
>         Attachments: Screen Shot 2017-05-26 at 19.15.28.png
>
>
> 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)