directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r424719 - in /directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core: interceptor/InterceptorChain.java schema/SchemaService.java
Date Sun, 23 Jul 2006 11:34:14 GMT
Author: elecharny
Date: Sun Jul 23 04:34:13 2006
New Revision: 424719

URL: http://svn.apache.org/viewvc?rev=424719&view=rev
Log:
Replaced the direct call to isDebugEnabled() by a check on a 
static boolean IS_DEBUG, because it's faster.

Modified:
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java?rev=424719&r1=424718&r2=424719&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
Sun Jul 23 04:34:13 2006
@@ -50,6 +50,9 @@
 {
     private static final Logger log = LoggerFactory.getLogger( InterceptorChain.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     private final Interceptor FINAL_INTERCEPTOR = new Interceptor()
     {
         private PartitionNexus nexus;
@@ -246,7 +249,7 @@
             {
                 InterceptorConfiguration cfg = ( InterceptorConfiguration ) i.next();
 
-                if ( log.isDebugEnabled() )
+                if ( IS_DEBUG )
                 {
                     log.debug( "Adding interceptor " + cfg.getName() );
                 }

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?rev=424719&r1=424718&r2=424719&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
Sun Jul 23 04:34:13 2006
@@ -81,6 +81,9 @@
     /** The LoggerFactory used by this Interceptor */
     private static Logger log = LoggerFactory.getLogger( SchemaService.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     /**
      * the root nexus to all database partitions
      */
@@ -815,7 +818,7 @@
     {
         long t0 = -1;
 
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             t0 = System.currentTimeMillis();
             log.debug( "Filtering entry " + AttributeUtils.toString( entry ) );



Mime
View raw message