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

Re: svn diff optimization to make blame faster?

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Fri, 20 Aug 2010 13:31:09 +0200

On Thu, Aug 19, 2010 at 11:38 PM, Johan Corveleyn <jcorvel_at_gmail.com> wrote:
> Feh, I just redid my apr_time_now+printf profiling with a release
> build (of trunk), instead of a debug build, and that makes a *big*
> difference. Total time of the svn_diff_diff call is now down to ~300
> ms. Still a lot slower than GNU diff (78 ms), but a lot better than
> with the debug build. That will teach me not to do performance tests
> with a debug build.
> Still, the challenge holds: why is svn diff ~4 times slower than GNU diff?
> Also, still puzzling to me: why does datasource_open take so long in
> the "modified" case? Now it takes twice as long as the while loop ...

/me bangs head against wall

The slowness of datasource_open was because of my antivirus (AVG free
edition). After disabling it, it's completely gone.

Running a release build, with antivirus disabled, and minimal
instrumentation brings svn diff performance (after a couple of runs)
more or less on par with GNU diff:

$ time svn diff bigfile.xml
Starting diff ... (entered svn_diff_diff in diff.c)
Diff finished in 78125 usec (78 millis)
real 0m0.359s
user 0m0.015s
sys 0m0.031s

I guess this closes this thread ... on to more useful stuff. There is
no point in trying to optimize svn diff, so I guess blame can only be
sped up by more fundamental changes (i.e. avoiding diffs, which still
amount to ~90% of blame time on the client side).

Sorry for any wasted time.

(on the bright side, I learned quite a lot about accurately measuring


Received on 2010-08-20 13:32:07 CEST

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

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