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

random access delta streams

From: Jim Blandy <jimb_at_zwingli.cygnus.com>
Date: 2000-11-13 23:37:03 CET

I'm thinking about storing really, really large objects in the
Subversion repository. How hard would it be to implement seeking on
the result of applying a seekable text delta to some seekable stream?

Roughly:

/* A type representing a big, seekable, read-only stream. */
typedef struct seekable_t seekable_t;

/* Read LEN bytes of data at offset POS in STREAM, and store them in
   BUF. */
svn_error_t *seekable_read (seekable_t *stream,
                            apr_off_t pos,
                            char *buf,
                            apr_size_t len);

/* Set *TARGET_P to a seekable stream whose contents are the result of
   applying the svndelta stream DELTA to the base stream SOURCE. */
svn_error_t *seekable_apply_delta (seekable_t *source,
                                   seekable_t *delta);

So if the Subversion filesystem has some 2-gigabyte file, with one
revision in fulltext and others represented as chains of deltas, I
could start with the fulltext and chain together stuff with
seekable_apply_delta, and actually get random access.

Is this even practical? Do I (or, does Greg S.) really have to spew
the whole 2 gig out into a temporary file to provide random access to
these things?
Received on Sat Oct 21 14:36:14 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.