[darcs-devel] mmap_slurp efficiency

David Roundy droundy at darcs.net
Sun Aug 28 04:23:07 PDT 2005


On Wed, Aug 24, 2005 at 10:31:05PM -0700, Jason Dagit wrote:
> Today is was brought to my attention in #darcs that mmap_slurp  
> creates a directory, changes to the directory and deletes the  
> directory every time it is called.  It does this to detect if it is  
> possible to use mmap.  This means that when running darcs check, it  
> could try to create/delete directories for each file.  Surely we only  
> need to do this check once?

Indeed, it *is* rather silly.  The trouble is that we need to do the check
once per repository or directory we're looking at, and keeping track of
which directories have been checked could be a pain.  e.g. often TMPDIR may
be all right for mmap, but the repository itself may not be (as is the case
at my work).  Or it could be the other way around, or there may be two
repositories involved in a get, one of which is on NFS and the other of
which is not.  I'd love it if someone figured out a nicer way of dealing
with this!
-- 
David Roundy
http://www.darcs.net




More information about the darcs-devel mailing list