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

Re: diff_file_diff3 spins

From: Chia-liang Kao <clkao_at_clkao.org>
Date: 2005-04-25 17:37:44 CEST

On Mon, Apr 25, 2005 at 03:28:27PM +0100, Philip Martin wrote:
> > $ ab -clkao- [/tmp/diff_file_diff3] time perl diff.t
> > _p_svn_diff_t=SCALAR(0x804d23c) at diff.t line 4.
> > 158.366u 1.264s 3:00.50 88.4% 10+16118k 0+0io 0pf+0w
> >
> > But with /usr/bin/diff3:
> >
> > $ ab -clkao- [/tmp/diff_file_diff3] time diff3 bad-empty.csv bad-local.csv
> > bad-new.csv > /dev/null
> > 0.455u 0.055s 0:00.64 78.1% 48+9124k 0+0io 0pf+0w
>
> This is likely to be because GNU diff uses a number of heuristics to
> shortcut the full diff algorithm and Subversion's diff implementation
> doesn't do this. Without the heuristics GNU diff is likely to take
> much longer. diff3 doesn't appear to allow one to disable the
> heuristics but diff has the --minimal switch, try
>
> $ diff --minimal bad-local.csv bad-new.csv

81.712u 0.288s 1:41.44 80.8% 56+9008k 0+0io 0pf+0w

> $ diff bad-local.csv bad-new.csv

$ ab -clkao- [/tmp/diff_file_diff3] time diff bad-local.csv bad-new.csv > /dev/null
0.102u 0.007s 0:00.11 90.9% 61+8630k 0+0io 0pf+0w

You are right. So is there any reason that we shouldn't have such
heuristics?

Cheers,
CLK

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 25 17:42:06 2005

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