camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Marinov (JIRA)" <>
Subject [jira] [Updated] (CAMEL-7374) Slow message processing due to unnecessary logging
Date Wed, 16 Apr 2014 17:26:18 GMT


Martin Marinov updated CAMEL-7374:

    Attachment: hotspot_bad.JPG

A screenshot of the JProfile session during which we found the issue. We were receiving 100000
events and the onMessage method was invoked 100000 times.

> Slow message processing due to unnecessary logging
> --------------------------------------------------
>                 Key: CAMEL-7374
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core, camel-jms
>    Affects Versions: 2.12.1
>         Environment: Windows 7 Enterprise 64 bit, Oracle JRE
>            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
> if (LOG.isDebugEnabled()) { } blocks.

This message was sent by Atlassian JIRA

View raw message