[jboss-dev] Braindead logging WAS [Fwd: [jboss-cvs] JBossAS SVN: r81764 - trunk/server/src/main/org/jboss/deployment.]

Adrian Brock abrock at redhat.com
Fri Nov 28 07:22:20 EST 2008


Why? Do you know how inefficient it is to invoke
isXXXEnabled() inside a loop?

This thing gets invoked for every file/subdeployment
that gets deployed and for each one iterates over a big list
of things to ignore.

-------- Forwarded Message --------
From: jboss-cvs-commits at lists.jboss.org
Reply-To: jboss-cvs-commits at lists.jboss.org
To: jboss-cvs-commits at lists.jboss.org
Subject: [jboss-cvs] JBossAS SVN: r81764 -
trunk/server/src/main/org/jboss/deployment.
Date: Fri, 28 Nov 2008 06:50:47 -0500

Author: alesj
Date: 2008-11-28 06:50:46 -0500 (Fri, 28 Nov 2008)
New Revision: 81764

Modified:
   trunk/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java
Log:
Undo Adrian's 'fix'.

Modified: trunk/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java	2008-11-28 10:55:58 UTC (rev 81763)
+++ trunk/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java	2008-11-28 11:50:46 UTC (rev 81764)
@@ -58,8 +58,6 @@
     */
    public boolean accepts(VirtualFile file)
    {
-      boolean trace = log.isTraceEnabled();
-      
       String pathName = file.getPathName();
       for (Map.Entry<String, Set<String>> entry : excludes.entrySet())
       {
@@ -70,7 +68,7 @@
             Set<String> value = entry.getValue();
             if (value == null || value.contains(simpleName))
             {
-               if (trace)
+               if (log.isTraceEnabled())
                   log.trace("Excluding " + pathName);
                
                return false;

_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-cvs-commits
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx




More information about the jboss-development mailing list