Hi,
While working on a new Camel component
(https://issues.apache.org/jira/browse/CAMEL-5828) and doing a speed
comparison between SEDA and DISRUPTOR endpoints, we ran into a test that
would take a lot more time then expected. This test was about using a SEDA
endpoint with a lot of parameters defined. In this test, we are sending a
lot of exchanges (1,000,000) using a ProducerTemplate and according to
JProfiler, 97% of the time is spent resolving a SLF4J debug call arguments:
// now lets dispatch
LOG.debug(">>>> {} {}", endpoint, exchange);
DefaultEndpoint.toString() turns out to be expensive to evaluate in those
conditions and this could be avoided if a simple guard would be added:
// now lets dispatch
if(LOG.isDebugEnabled())
{
LOG.debug(">>>> {} {}", endpoint, exchange);
}
Again, typical usage of an endpoint won't have a lot of parameters set by
the user, but it can happen nonetheless. It is fair to assume that logging
shouldn't have any performance impact unless it is turned on. Is it
possible to add this guard for the next release?
Thank you!
--
View this message in context:
http://camel.465427.n5.nabble.com/Little-ProducerCache-performance-improvement-when-dealing-with-long-URIs-tp5731282.html
Sent from the Camel Development mailing list archive at Nabble.com.