« Return to Thread: SVNKit slowness - what am I missing?

SVNKit slowness - what am I missing?

by Andy Cohen-2 :: Rate this Message:

Reply to Author | View in Thread

Hi! I've recently updated a fairly large Java program which uses
Subversion to selectively merge revision-ranges from one branch to
another. In its original version, this program directly invoked the svn
command-line programs, and parsed their stderr and stdout streams. The
new version uses SVNKit instead, and is much simpler, more maintainable,
and more reliable.

The only problem is, it takes about 10 times as long to run as the
previous version.

I've been scouring the Internet and the svnkit-users archives, and I've
tried the following things in an effort to improve the program's
performance:

    1) I put the JNA library in the classpath.
    2) I put the native jnidispatch library for solaris/x86 in
       the classpath.
    3) I disabled versioned symbolic links support in SVNKit, by
       including "-Dsvnkit.symlinks=false" on the command line.
    4) I downloaded version 1.3.0 of SVNKit "with_jna".
    5) I put "svnkit-javahl.jar" in the classpath.

None of these things has helped, and I suspect I'm just not setting
something up right. I've included what I think are the relevant details
below. I'm really hoping that I've made some stupid, obvious error or
omission - have I?

Thanks in advance for any help.

    Andy Cohen

==============================================================

Here's my classpath (line-wrapped for readability):

    CLASSPATH=
    /myDir/hooks
    :/myDir/hooks/lib/svnkit.jar
    :/myDir/hooks/lib/svnkit-javahl.jar
    :/myDir/hooks/lib/jna.jar
    :/myDir/hooks/lib/sunos-x86.jar

Here's the command I use to invoke my program (again, line-wrapped for
readability):

    $JAVA
    -Dsvnkit.symlinks=false
    -classpath $CLASSPATH
    $MY_MAIN_CLASS

Here's the Java code that sets up my SVNKit:

  private void initSvnKit()
  {
    // This code snippet will prevent SVNKit from automatically upgrading
    // any working copy it touches. This code is copied from:
    //
    //    
https://wiki.svnkit.com/SVNKit_FAQ#Q.3ACanthecurrentSVNKitversionbeforcedtocreatepre-1.5formatworkingcopies.3F
    //
    SVNAdminAreaFactory.setSelector
      (new ISVNAdminAreaFactorySelector()
        {
          public Collection getEnabledFactories
            (File        path,
             Collection  factories,
             boolean     writeAccess)
          throws SVNException
          {
            Collection enabledFactories = new TreeSet();
            for (Iterator factoriesIter = factories.iterator();
                 factoriesIter.hasNext();
                 )
            {
              SVNAdminAreaFactory factory
                = (SVNAdminAreaFactory)factoriesIter.next();
              int version = factory.getSupportedVersion();
              if (version == SVNAdminAreaFactory.WC_FORMAT_13
                  || version == SVNAdminAreaFactory.WC_FORMAT_14)
              {
                enabledFactories.add(factory);
              }
           }
           return enabledFactories;
         }
       }
     );

   
   
    SVNRepositoryFactoryImpl.setup();
    FSRepositoryFactory.setup();
   
    this.svnClientManager = SVNClientManager.newInstance();
    this.svnUpdateClient = svnClientManager.getUpdateClient();
    this.svnAdminClient = svnClientManager.getAdminClient();
//    this.svnChangelistClient = svnClientManager.getChangelistClient();
    this.svnCommitClient = svnClientManager.getCommitClient();
//    this.svnCopyClient = svnClientManager.getCopyClient();
    this.svnDiffClient = svnClientManager.getDiffClient();
    this.svnLogClient = svnClientManager.getLogClient();
    this.svnLookClient = svnClientManager.getLookClient();
//    this.svnMoveClient = svnClientManager.getMoveClient();
//    this.svnStatusClient = svnClientManager.getStatusClient();
    this.svnWCClient = svnClientManager.getWCClient();
  }

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...

 « Return to Thread: SVNKit slowness - what am I missing?