[darcs-users] Large initial sets

David Roundy droundy at abridgegame.org
Thu Aug 26 10:56:09 UTC 2004


On Wed, Aug 25, 2004 at 01:08:35PM +0200, Ivan Stankovic wrote:
> On Wed, Aug 25, 2004 at 06:47:41AM -0400, David Roundy wrote:
> > On Tue, Aug 24, 2004 at 10:25:27AM -0500, Taral wrote:
> > > I'd like to use darcs to manage linux kernel patches, but it appears
> > > there is no way to give darcs a large number of files without it trying
> > > to convert them into an in-memory patch...
> > 
> > True, darcs has to manipulate patches in ways that require that each patch
> > be held in memory.  To ease the burden of the initial patch, you could add
> > subdirectories one at a time each with separate records.  
> 
> This makes me wonder, why couldn't darcs do it automatically, in one
> (initial) record?  Do _all_ patches really need to be held in memory at
> the same time?  What's wrong with darcs recursively adding
> subdirectories?

Perhaps a --adds-only flag to record would be possible, which would allow
record to optimize its memory consumption because it would know that it
wouldn't need to commute patches around in order to "order" the patch.
Breaking an initial patch into multiple patches, while possible, is an
awfully ugly hack that I'd rather leave to the user.  It should be possible
to reduce memory use on the initial record to a reasonable level--that is
to say, to less than or equal to the memory used by darcs get on the same
patch.  Currently it's something like 50% higher than the memory used by
darcs get.

One area where we may be able to make some memory improvements is in the
handling of filenames.  I can switch to a packed representation.  The catch
is that then I'd have to unpack the filenames every time I want to pass
them to the standard library routines, and last time I tried this it gave a
slight performance hit (although that was a long time ago now).  Filenames
in darcs are well encapsulated, so it wouldn't be too hard to test this
out.  Probably it wouldn't make much gain in the memory usage.  Probably
the only thing that will help is increasing the laziness of the record so
it won't need to create the entire patch at once in memory.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list