[
https://issues.apache.org/jira/browse/CAMEL-7374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13972777#comment-13972777
]
Martin Marinov commented on CAMEL-7374:
---------------------------------------
David, that turned out to be true. However I spent tons of time debugging and
profiling without noticing that Camel was using the wrong log4j configuration.
I am closing the defect and heading to to find a proper combination of a rock
and a hard place.
I apologize for the false alarm.
> Slow message processing due to unnecessary logging
> --------------------------------------------------
>
> Key: CAMEL-7374
> URL: https://issues.apache.org/jira/browse/CAMEL-7374
> Project: Camel
> Issue Type: Bug
> Components: camel-core, camel-jms
> Affects Versions: 2.12.1
> Environment: Windows 7 Enterprise 64 bit, Oracle JRE 1.7.0.51
> Reporter: Martin Marinov
> Attachments: hotspot_bad.JPG
>
>
> org.apache.camel.component.jms.EndpointMessageListener.onMessage, line 68:
> LOG.debug("{} consumer received JMS message: {}", endpoint, message);
> When debug logging is disabled, the log string from above will not be output
> anywhere. Nevertheless, it will still be generated. The problem is that
> DefaultEndpoint.toString() calls URISupport.sanitizeUri() which uses regex
> pattern matching and replacing to process the passed endpoint URL. The
> java.util.regex.Matcher.replaceFirst methods turned out to be rather time
> consuming, thus slowing down the message processing and decreasing the
> message throughput under high loads.
> The same problem is observed in
> org.apache.camel.processor.SendProcessor.process(). It causes slower sending.
> Commenting the LOG.debug invocations at these places improved the message
> throughput almost 3 times! The solution, of course is not comment these
> lines, but probably to put them inside
> if (LOG.isDebugEnabled()) { } blocks.
--
This message was sent by Atlassian JIRA
(v6.2#6252)