Author: j16sdiz
Date: 2008-12-12 00:12:12 +0000 (Fri, 12 Dec 2008)
New Revision: 24219

Modified:
   trunk/plugins/XMLSpider/XMLSpider.java
Log:
optimization: estimate minimum prefix length

Modified: trunk/plugins/XMLSpider/XMLSpider.java
===================================================================
--- trunk/plugins/XMLSpider/XMLSpider.java      2008-12-12 00:12:00 UTC (rev 
24218)
+++ trunk/plugins/XMLSpider/XMLSpider.java      2008-12-12 00:12:12 UTC (rev 
24219)
@@ -560,7 +560,8 @@
                }
 
                indices = new Vector<String>();
-               int prefix = 1;
+               int prefix = (int)(( Math.log(tMap.size()) - 
Math.log(MAX_ENTRIES) ) / Math.log(16));
+               if (prefix == 0) prefix = 1;
                match = 1;
                Vector<String> list = new Vector<String>();
                Iterator<String> it = tMap.keySet().iterator();

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

Reply via email to