On Thu, Aug 19, 2010 at 11:38 PM, Johan Corveleyn <jcor...@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)
[snip]
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
performance)

Cheers,
-- 
Johan

Reply via email to