Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
Camel 2.x Speed optimizationsThis design page is about how to optimize and make Camel 2.x more performant. Source codeWe got an experiment branch at Apache at: You are welcome to checkout the branch and help along with tuning. Reduce Exchange copyingDONE in Camel 2.8 Currently Camel does defensive copying of the current Exchange being routed. This happens in Message FacadeWe should introduce a message facade to detect mutations to messages. IN should be immutableIf IN is immutable it makes redelivery much easier as we just pass in IN yet again. Only when redeliveringDONE in Camel 2.8 Optimize RedeliveryErrorHandlerDONE in Camel 2.8 Only copy Message and not ExchangeWONT FIX Not many processors can mutate IN messageMany of the processors (eg transports, protocols etc.) do not mutate/modify the IN message so we can leverage this fact that a copy is only needed in some situations. For instance the File producer do not mutate the IN message so we do not need to copy it even if we do redelivery. Logic can be build in to cater for this. For instance:
We dont have to go all the way, by having just all the Camel component/processors being able to indicate whether they can mutate or not is a big win. Coarse grained performance countersDONE in Camel 2.1 And we should add options for JMX to enable/disable this as you may not want to grab these details but only want JMX to be able to manage producers, consumers, routes and endpoints etc. ChannelOptimize Channel to be able to skip doing hoops through interceptors that is not needed such as: JMX, StreamCaching, Error Handler etc. when these are configured as disabled to be more strait through. Using YourKit profilerWe should use a profiler to aid find hotspots to optimize. Claus used YourKit to find the following hot spots:
Performance testsWe should have some performance tests we can run and see what we archive. A very crude experiment from Claus showed 2x gain by avoiding doing excessive exchange copies in the |