Peter Keller created CAMEL-13036:
------------------------------------

             Summary: Add the possibility to disable the invocation of 
ModelHelper.dumpModelAsXml()
                 Key: CAMEL-13036
                 URL: https://issues.apache.org/jira/browse/CAMEL-13036
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 2.23.0
            Reporter: Peter Keller


Add the possibility to disable the invocation of 
{{ModelHelper.dumpModelAsXml()}}. This is particularly disturbing for Camel 
contexts with a lot of route definitions as this uses a lot of processing time 
and the information is only used for log output.

Actual use in 2.x in {{RouteDefinition.java}}:
{code:java|title=RouteDefinition.java}
String beforeAsXml = ModelHelper.dumpModelAsXml(camelContext, this);
...
String afterAsXml = ModelHelper.dumpModelAsXml(camelContext, merged);
log.info("Adviced route before/after as XML:\n{}\n{}", beforeAsXml, afterAsXml);
{code}

In 2.X this should be optimized in {{RouteDefinition.java}}, in 3.X in 
{{RouteReifier.java}}.

Possible solution: Add {{log.isInfoEnabled{}}} guard.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to