[darcs-users] Using Darcs for large projects
Samuel A. Falvo II
sam.falvo at falvotech.com
Sat Jun 19 17:17:25 UTC 2004
On Saturday 19 June 2004 03:28 am, David Roundy wrote:
> Unfortunately, I suspect this happens very often, since every time we
> modify a file, we do it by writing a new copy and removing the old
> one--precisely to avoid breaking the mmap behavior (since if we modify
> an existing file, that would be bad).
Brute force, guaranteed to work, but slow as molasses.
Perhaps you might want to look into keeping a journal, containing a
complete list of the changes made to each file as darcs runs. Since
it's a journal, the file is append-only -- there is no time wasted
needlessly copying bytes from an old file to a new file, nor even
seeking within the current file.
As the execution of darcs comes to a close, it can replay the journal
file, and then update each of the affected files once and for all. By
reading the journal file, it has the opportunity to collate changes by
position in the target file affected, thus letting it update the file by
*sequentially* going through it.
Just an idea.
--
Samuel A. Falvo II
More information about the darcs-users
mailing list