yacy_search_server/source/de/anomic
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
..
crawler ConcurrentLinkedQueue has a VERY long return time on the .size() method. 2012-02-27 00:42:32 +01:00
data ConcurrentLinkedQueue has a VERY long return time on the .size() method. 2012-02-27 00:42:32 +01:00
http if a new pop-up page is set in config portal, then this page applies 2012-02-26 20:53:32 +01:00
server ConcurrentLinkedQueue has a VERY long return time on the .size() method. 2012-02-27 00:42:32 +01:00
tools !Important: move from Hashtable to HashMap 2012-01-09 01:29:18 +01:00