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

More diff lib stuff

From: Sander Striker <striker_at_apache.org>
Date: 2003-01-11 00:06:36 CET

Hi,

I'm progressing fairly well with implementing diff3
merged output with conflict markers.

$ ./diff3 original modified latest
a
c
e
b
d
e
<<<< MODIFIED
b
b
a
==== LATEST
g
g
f
>>>> END
c
b
e
<<<< MODIFIED
x
==== LATEST
y
>>>> END

Compare this to:

$ diff3 -m original modified latest
a
c
b
d
e
a
<<<<<<< original
c
||||||| modified
b
b
a
=======
g
g
f
>>>>>>> latest
b
e
d
<<<<<<< original

||||||| modified
x
=======
y
>>>>>>> latest

Which is pretty neat. I need to clean up some of this
code before committing though. Sorry about that.

Ofcourse, while working on this I stumbled over the
current implementation of diff... *blush* I remember
now that to get something working I used md5 hashes
of each line... No wonder we perform bad on 6MB files
(still only 3.5 seconds with a _lot_ of differences
and matches).

Secondly we can just pull the file into memory directly
instead of processing chunks of 4k at a time... Twice.

Anyhow, after I tackle the diff3 output those bottlenecks
are the first to go. It would be very nice if we could
come close to GNU diff performance (which I think we
can).

Bear with me...

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jan 11 00:07:25 2003

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