SVNKit slowness - what am I missing?

View: New views
4 Messages — Rating Filter:   Alert me  

SVNKit slowness - what am I missing?

by Andy Cohen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...


Re: SVNKit slowness - what am I missing?

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Andy,

What version of JDK do you use? On which platform? Is it the same as
before? Does running two different versions of SVNKit on the same
computer clearly demonstrates mentioned difference in performance?

Do you have a chance to run your program in a profiler (e.g. yourkit)
and send us a profiler's dump? This could help to find the reason of the
problem!

Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!

Andy Cohen wrote:

> 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@...
>
>

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


Re: SVNKit slowness - what am I missing?

by Andy Cohen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alexander Kitaev wrote:
> What version of JDK do you use?
 > $JAVA5_HOME/bin/java -version
java version "1.5.0_17"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_17-b04)
Java HotSpot(TM) Client VM (build 1.5.0_17-b04, mixed mode, sharing)

> On which platform?
 > arch
i686
 > uname -a
Linux pdbuild 2.6.9-55.0.9.ELsmp #1 SMP Tue Sep 25 02:17:24 EDT 2007
i686 i686 i386 GNU/Linux

Oops! I had thought I was using a Solaris machine, but it turns out I'm
using Linux. So, I've replaced the "sunos-x86.jar" file in my classpath
with "linux-i386.jar". Unfortunately, it does not seem to have solved my
performance problem.

I don't really understand the relationship between SVNKit and the
various jar-files. I suspect I'm including some superfluous jars - which
ones do I really need to speed up SVNKit? And which ones should I be
sure to leave out of my classpath? And do I need to make sure that I
have any particular C-libraries on my machine? If so, which ones, and
where can I obtain them?
>  Is it the same as
> before? Does running two different versions of SVNKit on the same
> computer clearly demonstrates mentioned difference in performance?
The old, non-SVNKit version of my program and the new, SVNKit version
are running side by side on the same machine, and show the performance
difference.
>
> Do you have a chance to run your program in a profiler (e.g. yourkit)
> and send us a profiler's dump? This could help to find the reason of the
> problem!
I've made a JIP dump, but I was unable to send it to the mailing list,
probably because it's too large. I've sent you a copy of that dump
directly. Thanks very much for your help!

Sincerely,

   Andy Cohen


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


Re: SVNKit slowness - what am I missing?

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I still suspect that the problem is missing jna.jar. You shouldn't add
any jars expect of those that are part of SVNKit distribution - jna.jar
is included and it contains classes for all supported platforms.

> I don't really understand the relationship between SVNKit and the
> various jar-files. I suspect I'm including some superfluous jars - which
> ones do I really need to speed up SVNKit? And which ones should I be
> sure to leave out of my classpath? And do I need to make sure that I
> have any particular C-libraries on my machine? If so, which ones, and
> where can I obtain them?
You only need jna.jar - it is part of SVNKit and by default is on jsvn
classpath (in case you're running SVNKit command line client).

> I've made a JIP dump, but I was unable to send it to the mailing list,
> probably because it's too large. I've sent you a copy of that dump
> directly. Thanks very much for your help!
I didn't receive it, could you please resend it? You may send it to
kitaev@... in case svnkit.com mail server rejects that file.

Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!

Andy Cohen wrote:

> Alexander Kitaev wrote:
>> What version of JDK do you use?
>> $JAVA5_HOME/bin/java -version
> java version "1.5.0_17"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_17-b04)
> Java HotSpot(TM) Client VM (build 1.5.0_17-b04, mixed mode, sharing)
>
>> On which platform?
>> arch
> i686
>> uname -a
> Linux pdbuild 2.6.9-55.0.9.ELsmp #1 SMP Tue Sep 25 02:17:24 EDT 2007
> i686 i686 i386 GNU/Linux
>
> Oops! I had thought I was using a Solaris machine, but it turns out I'm
> using Linux. So, I've replaced the "sunos-x86.jar" file in my classpath
> with "linux-i386.jar". Unfortunately, it does not seem to have solved my
> performance problem.
>
> I don't really understand the relationship between SVNKit and the
> various jar-files. I suspect I'm including some superfluous jars - which
> ones do I really need to speed up SVNKit? And which ones should I be
> sure to leave out of my classpath? And do I need to make sure that I
> have any particular C-libraries on my machine? If so, which ones, and
> where can I obtain them?
>>  Is it the same as
>> before? Does running two different versions of SVNKit on the same
>> computer clearly demonstrates mentioned difference in performance?
> The old, non-SVNKit version of my program and the new, SVNKit version
> are running side by side on the same machine, and show the performance
> difference.
>>
>> Do you have a chance to run your program in a profiler (e.g. yourkit)
>> and send us a profiler's dump? This could help to find the reason of the
>> problem!
> I've made a JIP dump, but I was unable to send it to the mailing list,
> probably because it's too large. I've sent you a copy of that dump
> directly. Thanks very much for your help!
>
> Sincerely,
>
>   Andy Cohen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svnkit-users-unsubscribe@...
> For additional commands, e-mail: svnkit-users-help@...
>
>

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