yacy_search_server/source/de/anomic/server
Michael Peter Christen 2fc8ecee36 ConcurrentLinkedQueue has a VERY long return time on the .size() method.
See
http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html

and the following test programm:

public class QueueLengthTimeTest {


    public static long countTest(Queue<Integer> q, int c) {
        long t = System.currentTimeMillis();
        for (int i = 0; i < c; i++) {
            q.add(q.size());
        }
        return System.currentTimeMillis() - t;
    }

    public static void main(String[] args) {
        int c = 1;
        for (int i = 0; i < 100; i++) {
            Runtime.getRuntime().gc();
            long t1 = countTest(new ArrayBlockingQueue<Integer>(c), c);
            Runtime.getRuntime().gc();
            long t2 = countTest(new LinkedBlockingQueue<Integer>(), c);
            Runtime.getRuntime().gc();
            long t3 = countTest(new ConcurrentLinkedQueue<Integer>(),
c);

            System.out.println("count = " + c + ": ArrayBlockingQueue =
" + t1 + ", LinkedBlockingQueue = " + t2 + ", ConcurrentLinkedQueue = "
+ t3);
            c = c * 2;
        }
    }
}
2012-02-27 00:42:32 +01:00
..
serverAccessTracker.java ConcurrentLinkedQueue has a VERY long return time on the .size() method. 2012-02-27 00:42:32 +01:00
serverClassLoader.java some last-minute performance hacks 2011-11-25 11:23:52 +00:00
serverCore.java some last-minute performance hacks 2011-11-25 11:23:52 +00:00
serverCoreSocket.java *) made sure that &nbsp; is replaced with a space and not just deleted in CharacterCoding.java 2009-10-13 20:57:56 +00:00
serverHandler.java This is a large bugfix and enhancement commit to support a better location detection for data 2010-05-11 11:14:05 +00:00
serverObjects.java !Important: move from Hashtable to HashMap 2012-01-09 01:29:18 +01:00
serverSwitch.java serverSwitch get(App/Data)Path() use common helper method 2012-01-09 01:26:03 +01:00
serverSwitchAbstractAction.java start of a really extensive refactoring which will produce a hierarchical package structure with the domain yacy.net as package root 2009-10-09 23:13:30 +00:00
servletProperties.java preparations to move the HTCache into cora: 2010-08-23 12:32:02 +00:00