yacy_search_server/source/net/yacy/kelondro
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
..
blob use less proccesses in process pool 2012-02-25 14:07:20 +01:00
data ConcurrentLinkedQueue has a VERY long return time on the .size() method. 2012-02-27 00:42:32 +01:00
index more tolerant merge iterator 2012-02-23 01:21:24 +01:00
io free some memory after parsing html 2012-02-02 09:55:27 +01:00
logging enriched log output to find NPE in HeapReader 2012-01-15 12:08:46 +01:00
order performance hack 2012-01-25 12:48:48 +01:00
rwi better error messages 2012-01-23 00:47:25 +01:00
table serialized some database access methods 2012-01-31 21:13:49 +01:00
util ConcurrentLinkedQueue has a VERY long return time on the .size() method. 2012-02-27 00:42:32 +01:00
workflow WorkflowProcess is forced to make small pauses if shortMemoryStatus is 2012-01-10 03:03:12 +01:00