Mercurial > hg4j
diff test/org/tmatesoft/hg/test/MapTagsToFileRevisions.java @ 304:85b8efde5586
Use memory-friendly set implementation to canonicalize filenames and nodeids
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 21 Sep 2011 18:26:16 +0200 |
parents | 6dbbc53fc46d |
children | 2f2ab5c27f41 |
line wrap: on
line diff
--- a/test/org/tmatesoft/hg/test/MapTagsToFileRevisions.java Tue Sep 20 04:43:39 2011 +0200 +++ b/test/org/tmatesoft/hg/test/MapTagsToFileRevisions.java Wed Sep 21 18:26:16 2011 +0200 @@ -39,8 +39,8 @@ // Pattern p = Pattern.compile("^doc/[^/]*?\\.[0-9]\\.(x|ht)ml"); // System.out.println(p.matcher("doc/asd.2.xml").matches()); // System.out.println(p.matcher("doc/zxc.6.html").matches()); - m.collectTagsPerFile(); -// m.manifestWalk(); +// m.collectTagsPerFile(); + m.manifestWalk(); m = null; System.gc(); System.out.printf("Free mem: %,d\n", Runtime.getRuntime().freeMemory()); @@ -92,6 +92,7 @@ // // With Pool<StringProxy> for fname and flags, Nodeid's ascii2bin through local array, overall byte[] iteration, // 0..10k is 34 seconds now + // Another run, 23 seconds now, seems nothing has been changed. Switched to Pool2 with DirectHashSet: 22,5 seconds System.out.printf("Total time: %d ms\n", System.currentTimeMillis() - start); System.out.printf("Free mem: %,d\n", Runtime.getRuntime().freeMemory()); }