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

[PATCH]: Implement xdelta, use it by default

From: Daniel Berlin <dberlin_at_dberlin.org>
Date: 2005-02-11 23:31:23 CET

It turns out i forgot to extend matches backwards as far as possible as
well. Doing that buys us another 5-10% of space back, so the space used
for xdelta is only about 10-15% more.

This implementation is, on average, 5x faster than vdelta, compiled at
-O2. In my testing, it is never slower (and never even close to as
slow :P)

The current implementation falls back to using vdelta when the source
data is null, in order to get self-compression like we currently do.

This patch passes all regression tests, and has been tested by loading
the entire gcc repo, redumping, and verifying everything still matches
in the dumpfiles :).

Add xdelta algorithm, and use it by default

* subversion/libsvn_delta/vdelta.c: Add apr_hash.h include.
(struct adler32): New structure.
(adler32_in): New function.
(adler32_out): Ditto.
(adler32_sum): Ditto.
(init_adler32): Ditto.
(struct match): New structure.
(init_matches_table): New function.
(find_match): Ditto.
(compute_delta): Ditto.
(NOOP, XDELTA, VDELTA): Macros to determine which delta algorithm to
use.
Default to xdelta.
(svn_txdelta__vdelta): Call the approriate delta generator.

I'm also happy to create a new xdelta.c file and use it in text_delta
instead if that is what is preferred instead of doing it this way.
:)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Fri Feb 11 23:32:37 2005

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