Mercurial > hg4j
diff cmdline/org/tmatesoft/hg/console/Log.java @ 197:3a7696fb457c
Investigate optimization options to allow fast processing of huge repositories. Fix defect in StatusCollector that lead to wrong result comparing first revision to empty repo (-1 to 0), due to same TIP constant value
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 19 Apr 2011 03:49:29 +0200 |
parents | b9700740553a |
children | 33a7d76f067b |
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Log.java Mon Apr 18 18:04:24 2011 +0200 +++ b/cmdline/org/tmatesoft/hg/console/Log.java Tue Apr 19 03:49:29 2011 +0200 @@ -35,6 +35,8 @@ */ public class Log { + // -agentlib:hprof=heap=sites,depth=10,etc might be handy to debug speed/memory issues + public static void main(String[] args) throws Exception { Options cmdLineOpts = Options.parse(args); HgRepository hgRepo = cmdLineOpts.findRepository(); @@ -45,7 +47,7 @@ final Dump dump = new Dump(hgRepo); dump.complete = cmdLineOpts.getBoolean("--debug"); dump.verbose = cmdLineOpts.getBoolean("-v", "--verbose"); - dump.reverseOrder = true; + dump.reverseOrder = false; HgLogCommand cmd = new HgLogCommand(hgRepo); for (String u : cmdLineOpts.getList("-u", "--user")) { cmd.user(u); @@ -58,6 +60,7 @@ cmd.limit(limit); } List<String> files = cmdLineOpts.getList(""); + final long start = System.currentTimeMillis(); if (files.isEmpty()) { if (limit == -1) { // no revisions and no limit @@ -90,8 +93,9 @@ dump.complete(); } } - // - // XXX new ChangelogWalker().setFile("hello.c").setRevisionRange(1, 4).accept(new Visitor); +// cmd = null; + System.out.println("Total time:" + (System.currentTimeMillis() - start)); +// Main.force_gc(); } private static int fixRange(int[] start_end, boolean reverse, int limit) {