Hi Okay so the fast endpoint configurer is now in place for all endpoints (mllp is still pending but we got an idea whats the problem). What is missing is to make fast component options configurer as well, which are in use when you use spring boot, camel main, camel k, etc. (and you configure via application properties, or OS ENV etc.). But it should be doable in similar way as we did for endpoints.
On Fri, Aug 23, 2019 at 1:14 PM Claus Ibsen <[email protected]> wrote: > > Hi > > The code has been merged on master. > > I am working on further improving to use a single configurer class for > all endpoint instances, instead of creating a new configurer per > endpoint. > And to polish the naming of the API in camel-api > > On Fri, Aug 23, 2019 at 10:02 AM Claus Ibsen <[email protected]> wrote: > > > > Hi > > > > Just a heads up, that the code is now in good shape, and I will work > > on merging to master. > > > > On Thu, Aug 22, 2019 at 2:34 PM Claus Ibsen <[email protected]> wrote: > > > > > > Hi > > > > > > JIRA ticket > > > https://issues.apache.org/jira/browse/CAMEL-13870 > > > > > > We have been working on further optimize Apache Camel. And the latest > > > step is to configure all of Camel endpoints in a faster way via direct > > > method invocatations of the setter methods on the endpoint or its > > > configuration class. > > > > > > Beforehand we did a java reflection introspection to discover the > > > getter/setters and then match that against the uri parameters. > > > > > > What we have done now is to source code generate fast setters > > > (endpoint configurer classes) that are automatic generated via > > > camel-apt compiler plugin. Then at runtime we discover this configurer > > > class and use it instead of the "old way". > > > > > > All this work is done in a separate branch with name CAMEL-13870. The > > > code is now ready for review (if anyone want to take a peak) and then > > > get shaped so it can be merged onto master branch. > > > > > > This technique is the same we already do for fast > > > - type converters > > > - fast EIP configurations > > > > > > So its just another step ahead but for the biggest of them all - all > > > the 300+ endpoints. > > > > > > The next level after this is to do the same for component options > > > (however we configure endpoints much more frequently). > > > > > > We have also added a BeanIntrospection SPI that captures runtime usage > > > of java reflection, so we can use this to find bottlenecks and improve > > > even more. > > > > > > In case you ask if its faster - yes. But its not as measureable. But > > > we are talking about not using Java reflection at all, and also its > > > invoking direct java method invocations. > > > > > > A very early micro benchmark test via tests/camel-jmh showed that > > > setting just 1 option with old vs fast way was approx 40% quicker - on > > > the log endpoint. The tests are part of the massive commit. > > > > > > For component developers then this is enabled out of the box if you > > > use camel-apt. But you can turn it off by setting generateConfigurer = > > > false in the @UriEndppoint annotation. We have done this for > > > camel-mllp as it has some weird issue (its not developed to best > > > standard so it actually surfaces a problem it has currently). You can > > > also turn it off at runtime by setting basicPropertyBinding=true on > > > component|endpoint level. > > > > > > > > > > > > > > > > > > > > > -- > > > Claus Ibsen > > > ----------------- > > > http://davsclaus.com @davsclaus > > > Camel in Action 2: https://www.manning.com/ibsen2 > > > > > > > > -- > > Claus Ibsen > > ----------------- > > http://davsclaus.com @davsclaus > > Camel in Action 2: https://www.manning.com/ibsen2 > > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
