Seeking SVNKit speedup via JavaHL -

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

Seeking SVNKit speedup via JavaHL -

by Andy Cohen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a fairly large program which selectively merges ranges of
revisions from one branch to another. This program originally invoked
the SVN command-line programs and parsed their output directly. When I
converted the program to use SVNKit, the program became much simpler,
much more robust, much more maintainable, and much slower.

I don't want to go back to my old way of doing things - I'd much prefer
to use SVNKit more efficiently.

When my program starts up, it first runs "svn log" several times to
gather data about various revisions. I tried using SVNKit's "jna"
facilities to speed up this operation, but as near as I can tell, SVNKit
does not use jna when performing its doLog() operation. Is that right?

Next, I tried to use javaHL. I converted my program to use the
org.tigris.subversion.javahl.SVNClient API instead of the
com.iii.svn.Subversion.svnLogClient.SVNLogClient API. When I ran my
newly javaHL-centric program, however, SVNClient.logMessages() returned
immediately. Fast is good, but this was a little too fast. When I
examined SVNClientImpl.java, I found an empty implementation of
SVNClient.logMessages(), with only a "TODO" comment inside it.

So, I'm feeling a little doomed, and I have two questions:

   1) Is there really no way to use jna to speed up svnLogClient.doLog()?
   2) Is there really no way to run SVNClientImpl.logMessages()?
   3) Is there anything else I could do to speed up this operation? I've
checked, and
       my handler really takes up very little of the total time.

I'm hoping that someone will show me that I've missed something huge and
obvious!
Thanks for any help,

    Andy Cohen




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


Re: Seeking SVNKit speedup via JavaHL -

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Andy,

First, I have to say that while JNA affects SVNKit performance, affected
are mainly low-level file system operations, not those like "log" that
mainly depends on the server-side performance (SVNKit sends requests to
repository and then displays an answer without any sort of expensive
result processing). So enabling JNA shouldn't really improve log
operation performance.

Then, thank you very much for pointing into JavaHL issue. Indeed one of
the logMessages method was not implemented (one with RevisionRange[]
parameter, now it is implemented in 1.3.x branch). However, all other
logMessages methods in SVNClientImpl class are implemented and work as
expected.

Finally, regarding performance issue. You're initially reported that
performance has decreased since upgrading to SVNKit 1.3.0. One of the
most possible reasons for performance decrease is that you're now
requesting log information with merge info - this puts additional load
on the server and fetching log message with merge info included is
slower comparing to plain log operation.

What options do you use when calling doLog or logMessages operation?

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

Andy Cohen wrote:

> I have a fairly large program which selectively merges ranges of
> revisions from one branch to another. This program originally invoked
> the SVN command-line programs and parsed their output directly. When I
> converted the program to use SVNKit, the program became much simpler,
> much more robust, much more maintainable, and much slower.
>
> I don't want to go back to my old way of doing things - I'd much prefer
> to use SVNKit more efficiently.
>
> When my program starts up, it first runs "svn log" several times to
> gather data about various revisions. I tried using SVNKit's "jna"
> facilities to speed up this operation, but as near as I can tell, SVNKit
> does not use jna when performing its doLog() operation. Is that right?
>
> Next, I tried to use javaHL. I converted my program to use the
> org.tigris.subversion.javahl.SVNClient API instead of the
> com.iii.svn.Subversion.svnLogClient.SVNLogClient API. When I ran my
> newly javaHL-centric program, however, SVNClient.logMessages() returned
> immediately. Fast is good, but this was a little too fast. When I
> examined SVNClientImpl.java, I found an empty implementation of
> SVNClient.logMessages(), with only a "TODO" comment inside it.
>
> So, I'm feeling a little doomed, and I have two questions:
>
>   1) Is there really no way to use jna to speed up svnLogClient.doLog()?
>   2) Is there really no way to run SVNClientImpl.logMessages()?
>   3) Is there anything else I could do to speed up this operation? I've
> checked, and
>       my handler really takes up very little of the total time.
>
> I'm hoping that someone will show me that I've missed something huge and
> obvious!
> Thanks for any help,
>
>    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@...


Re: Seeking SVNKit speedup via JavaHL -

by Andy Cohen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alexander Kitaev wrote:
> [...]
> What options do you use when calling doLog or logMessages operation?
Alexander, you were exactly right! I was not doing an apples-to-apples
comparison between the SVN command-line tools and SVNKit for the "svn
log" operation. Specifically, my SVNKit program does the equivalent of
"svn --verbose log", but I was timing only the non-verbose "svn log"
command-line invocation.

When I compared equivalent operations, they took exactly the same time.
Hooray for SVNKit!

I still believe that I have some SVNKit performance problems regarding
merging and/or committing changes, but thanks to you, I know I can stop
spending time examining SVNKit's "svn log" performance, and move on to
other parts of the program. I'll probably have more questions as I get
further along with that task.

Also, I have another program to write which will do only "svn log"
operations, and I now have a high degree of confidence that it will
perform well.

Thank you very much,

    Andy Cohen


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