Re: Camel ApiName Enumeration : object creation optimization

2015-12-10 Thread lb
Done. https://issues.apache.org/jira/browse/CAMEL-9408 https://github.com/apache/camel/pull/720 On Wed, Dec 9, 2015 at 5:27 PM, Claus Ibsen wrote: > Hi Luca > > Yay thanks for reporting this. Yeah a JIRA and patch / PR is much welcome > http://camel.apache.org/contributing > > On Wed, Dec 9, 20

Re: Camel ApiName Enumeration : object creation optimization

2015-12-09 Thread Claus Ibsen
Hi Luca Yay thanks for reporting this. Yeah a JIRA and patch / PR is much welcome http://camel.apache.org/contributing On Wed, Dec 9, 2015 at 2:52 PM, lb wrote: > Hi, > > I've noticed that the code generated by camel-api-component-maven-plugin > for ApiName can potentially generate excessive gar

Camel ApiName Enumeration : object creation optimization

2015-12-09 Thread lb
Hi, I've noticed that the code generated by camel-api-component-maven-plugin for ApiName can potentially generate excessive garbage if fromValue is invoked often, this is because: - enum::values() is not cached so it generates a new array for each call - new for style generates an iterator each t