On Aug 15, 2008, at 08:36, Andreas Zwinkau wrote:
> is the default svn diff algorithm slow? Trying to diff a 17MB text
> file takes forever.
>
> Try this:
>
> 1. create new repo
> 2. create checkout
> 3. download http://www.info.uni-karlsruhe.de/~zwinkau/
> gen_patterns.c.repo.gz,
> gunzip and check it into the repo
> 4. overwrite the file with the gunzipped
> http://www.info.uni-karlsruhe.de/~zwinkau/gen_patterns.c.mod.gz
> 5. svn diff the file
> 6. ...wait...
>
> If i use "--diff-cmd diff" instead, it takes a second on my machine.
I haven't noticed "svn diff" being slow before, but I can confirm it
is slow with your example. Then again, your example produces on the
order of 215,000 lines of diff. Maybe "svn diff" is not optimized for
this case. This is on a MacBook Pro running Leopard from an external
7200-rpm FireWire 400 drive. It seems to spend most of its time
reading the disk, though one of the processors goes to 100% too.
$ cd /tmp
$ svnadmin create repo
$ svn co file://`pwd`/repo wc
Checked out revision 0.
$ cd wc
$ curl -O http://www.info.uni-karlsruhe.de/~zwinkau/
gen_patterns.c.repo.gz
% Total % Received % Xferd Average Speed Time Time
Time Current
Dload Upload Total Spent
Left Speed
100 1056k 100 1056k 0 0 143k 0 0:00:07 0:00:07
--:--:-- 242k
$ gunzip gen_patterns.c.repo.gz
$ svn add gen_patterns.c.repo
A gen_patterns.c.repo
$ svn ci -m ""
Adding gen_patterns.c.repo
Transmitting file data .
Committed revision 1.
$ curl -O http://www.info.uni-karlsruhe.de/~zwinkau/
gen_patterns.c.mod.gz
% Total % Received % Xferd Average Speed Time Time
Time Current
Dload Upload Total Spent
Left Speed
100 1058k 100 1058k 0 0 197k 0 0:00:05 0:00:05
--:--:-- 297k
$ gunzip gen_patterns.c.mod.gz
$ mv gen_patterns.c.mod gen_patterns.c.repo
$ svn st
M gen_patterns.c.repo
$ time svn di > diff1
real 2m35.922s
user 2m29.533s
sys 0m3.522s
$ time svn di --diff-cmd diff > diff2
real 0m0.807s
user 0m0.374s
sys 0m0.171s
$
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-16 01:54:32 CEST