Author: nextgens
Date: 2009-04-17 20:13:11 +0000 (Fri, 17 Apr 2009)
New Revision: 26955

Modified:
   branches/nextgens-stuffs/freenet/src/freenet/io/comm/MessageCore.java
Log:
That debug code is *way* to costy in this hotspot.

Modified: branches/nextgens-stuffs/freenet/src/freenet/io/comm/MessageCore.java
===================================================================
--- branches/nextgens-stuffs/freenet/src/freenet/io/comm/MessageCore.java       
2009-04-17 20:09:16 UTC (rev 26954)
+++ branches/nextgens-stuffs/freenet/src/freenet/io/comm/MessageCore.java       
2009-04-17 20:13:11 UTC (rev 26955)
@@ -193,26 +193,20 @@
                        if(list != null) {
                                for (ListIterator<MessageFilter> i = 
list.listIterator(); i.hasNext();) {
                                        MessageFilter f = i.next();
-                                       if (f.matched()) {
-                                               Logger.error(this, "removed 
pre-matched message filter found in _filters: "+f);
-                                               try {
-                                                       
messageFiltersWriteLock.lock();
-                                                       i.remove();
-                                               } finally {
-                                                       
messageFiltersWriteLock.unlock();
-                                               }
-                                               continue;
-                                       }
                                        if (f.match(m, tStart)) {
-                                               matched = true;
+                                               if (f.matched()) {
+                                                       Logger.error(this, 
"removed pre-matched message filter found in _filters: "+f);
+                                               } else {
+                                                       matched = true;
+                                                       match = f;
+                                                       if(logMINOR) 
Logger.minor(this, "Matched: "+f);
+                                               }
                                                try {
                                                        
messageFiltersWriteLock.lock();
                                                        i.remove();
                                                } finally {
                                                        
messageFiltersWriteLock.unlock();
                                                }
-                                               match = f;
-                                               if(logMINOR) Logger.minor(this, 
"Matched: "+f);
                                                break; // Only one match 
permitted per message
                                        }
                                }

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to