[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Performance patch for CmdLineStreamPumper.java

From: Jennifer Bevan <jen_at_alouysius.net>
Date: 2005-01-12 19:32:30 CET

Hi,
I'd like to suggest the following patch for CmdLineStreamPumper.java.
It causes a high speedup in the completion of the log command, which was
my test scenario. The log messages returned with and without this patch
were
identical.

Thanks,
Jennifer Bevan

Here's the stats:
++++++++++++++++++++++++++++++++++++++
Instrumented with:
CmdLineClientAdapter:getLogMessages(URL arg0,SVNRevision
arg1,SVNRevision arg2){ ....
+ Calendar starttime = Calendar.getInstance();
    String messages = _cmd.log(toString(arg0), revRange);
+ Calendar stoptime = Calendar.getInstance();
+ System.out.println("Time in millis to exec _cmd.log: " +
+ (stoptime.getTimeInMillis() - starttime.getTimeInMillis()));
    ....
}
----------------------------
                                                                              

Command Line:log -r {2002-12-31 16:00:00 -0800}:{2003-03-31 16:00:00
-0800} http://svn.collab.net/repos/svn/trunk --xml -v --non-interactive
----------------------------
                                                                              

As is:
Time in millis to exec _cmd.log: 167643
Time in millis to exec _cmd.log: 167784
                                                                                

With patch to CmdLineStreamPumper.java
Time in millis to exec _cmd.log: 5057
Time in millis to exec _cmd.log: 4746
Time in millis to exec _cmd.log: 4927
++++++++++++++++++++++++++++

Here's the patch:

Index: CmdLineStreamPumper.java
===================================================================
--- CmdLineStreamPumper.java (revision 1202)
+++ CmdLineStreamPumper.java (working copy)
@@ -75,9 +75,6 @@
                 } else {
                     sb.append(st+NEWLINE);
                 }
- try {
- Thread.sleep(SLEEP);
- } catch (InterruptedException e) {}
             }
         } catch (Exception e) {
             // ignore
Received on Thu Jan 13 05:32:30 2005

This is an archived mail posted to the Subclipse Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.