yacy_search_server/source/de/anomic/data
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
..
list replaced all 'new String' with default encoding (missing) or UTF-8 encoding with a String generation method that uses a pre-defined Charset constant for UTF-8. This avoids a cache-lookup for the Charset object using String hashing of the String 'UTF-8'. 2011-03-07 20:36:40 +00:00
wiki some last-minute performance hacks 2011-11-25 11:23:52 +00:00
ymark Removed handling of components objects for URIMetadataRows. 2011-12-17 01:27:08 +01:00
BlogBoard.java more UTF8 getBytes() performance hacks 2011-04-12 05:02:36 +00:00
BlogBoardComments.java some last-minute performance hacks 2011-11-25 11:23:52 +00:00
BookmarkDate.java more UTF8 getBytes() performance hacks 2011-04-12 05:02:36 +00:00
BookmarkHelper.java memory hacks 2012-02-02 07:37:00 +01:00
BookmarksDB.java fix for bookmark crash with possible side-effects on crawl start after 2012-01-19 23:06:09 +01:00
DidYouMean.java fix for concurrency problem and endless loop in /suggest.json 2012-01-05 08:35:44 +01:00
Diff.java *) renamed classes according to standard Java coding conventions 2010-11-21 01:29:32 +00:00
ListManager.java Minor correction to prevent useless comma at beginning of string, created from list 2011-11-20 15:20:57 +00:00
MessageBoard.java more UTF8 getBytes() performance hacks 2011-04-12 05:02:36 +00:00
Translator.java added Ukrainian translation 2012-01-17 17:45:28 +01:00
URLAnalysis.java refactoring: 2011-09-25 16:59:06 +00:00
URLLicense.java ConcurrentLinkedQueue has a VERY long return time on the .size() method. 2012-02-27 00:42:32 +01:00
UserDB.java refactoring 2011-12-16 23:59:29 +01:00
WorkTables.java refactoring: 2011-09-25 16:59:06 +00:00