[ https://issues.apache.org/activemq/browse/CAMEL-3123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61840#action_61840 ]
Stephan Siano commented on CAMEL-3123: -------------------------------------- Does your sample send these messages sequentially (in one thread)? If this is the case, the improvement will be even much larger if you have e.g, 10 threads sending 50 messages each (because the time you save is almost completely in a synchronized method). I am still unsure about what this PropertyManagerEditor.findEditor() method does. In my example it is called six times for a message, two times each with org.mortbay.jetty.Request, org.mortbay.jetty.Response, and java.lang.StringBuffer. It seems always to trigger ClassLoader.loadClass() calls which trigger the following calls: org.ops4j.pax.swissbox.core.BundleClassLoader.loadClass(java.lang.String,boolean)java.lang.Class org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(java.lang.String,boolean)java.lang.Class sun.misc.Launcher$AppClassLoader.loadClass(java.lang.String,boolean)java.lang.Class I have actually no idea why this is necessary at all, but it might help to keep all the found editors with the PropertyEditorTypeConverter (is that what you did?). Might that break some OSGi bundle concept? > Performance/scalability issue for converter lookup > -------------------------------------------------- > > Key: CAMEL-3123 > URL: https://issues.apache.org/activemq/browse/CAMEL-3123 > Project: Apache Camel > Issue Type: Improvement > Components: camel-core > Affects Versions: 2.4.0 > Environment: Camel 2.4.0 on apache karaf 2.0.0 > Reporter: Stephan Siano > Assignee: Claus Ibsen > > In a simple HTTP->HTTP proxy scenario (whith a Jetty or a servlet endpoint, > that does not matter) I observe a very severe performance regression between > Camel 2.2.0 (as in servicemix 4.2) and camel 2.4.0 running on a apache karaf > 2.0.0 OSGi stack. On the same hardware I get a throughput of 3500 messages > per second with Camel 2.2.0, but only 210 messages per second on Camel 2.4.0 > (both servlet->HTTP). If I replace the http endpoint with a log endpoint the > throughput will be about 1500 messages per second in both cases. > I have done some profiling for this: The active CPU times as shown in the > profiler remain approximately the same for both versions, however if I > monitor wait times, I get very long wait times for > org.apache.camel.impl.DefaultMessage.getHeader(java.lang.String,java.lang.Class) > calls. If I break this down I see the > java.beans.PropertyEditorManager.findEditor(java.lang.Class) call in > org.apache.camel.impl.converter.PropertyEditorTypeConverter.convertTo(java.lang.Class,java.lang.Object). > The findEditor() method is synchronized and initializes some class loading > which takes some time. > Why is it necessary to instantiate the type converter for each message? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.