changeset 3557:f1f798b5f14a

Made expensive XMLUtils.toString() debug output conditional. flys-artifacts/trunk@5153 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 29 Jul 2012 11:11:51 +0000
parents afc7bfb4800b
children c3cd414982fe
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/GaugeInfoService.java
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Sun Jul 29 11:04:06 2012 +0000
+++ b/flys-artifacts/ChangeLog	Sun Jul 29 11:11:51 2012 +0000
@@ -1,3 +1,8 @@
+2012-07-29	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/services/GaugeInfoService.java:
+	  Made expensive XMLUtils.toString() debug output conditional.
+
 2012-07-29	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	Use the new infrastructure to figure out if a facet should
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/GaugeInfoService.java	Sun Jul 29 11:04:06 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/GaugeInfoService.java	Sun Jul 29 11:11:51 2012 +0000
@@ -75,8 +75,9 @@
     ) {
         logger.debug("GaugeInfoService.process");
 
-        // XXX REMOVE THIS
-        logger.debug(XMLUtils.toString(data));
+        if (logger.isDebugEnabled()) {
+            logger.debug(XMLUtils.toString(data));
+        }
 
         River river = getRiverFromRequest(data);
 
@@ -88,6 +89,7 @@
             for (Filter f: filters) {
                 if (f.apply(g)) {
                     filtered.add(g);
+                    break;
                 }
             }
         }

http://dive4elements.wald.intevation.org