[darcs-devel] Improving pull performance

David Roundy droundy at abridgegame.org
Sun Aug 7 06:18:45 PDT 2005


On Sun, Aug 07, 2005 at 01:39:19PM +0200, Florian Weimer wrote:
> * David Roundy:
> 
> > It looks like the fptools repo has been tagged and optimized already
> > sometime before July 12, unless the dates on the server are wrong, the
> > slowness you're seeing may be due to some other issue.
> 
> Well, the file
> 
> /fptools/_darcs/inventories/20050516215437-c2a52-0ccd467c6cd57adc1a545d6d2e92b28c6e1342fc.gz
> 
> is still downloaded on each pull, even if there aren't any server-side
> changes at all. 8-(

Ah, that's a bug then.  Darcs has no reason whatsoever to read that file.

I'll be sending in a patch in a moment to fix this.  It turns out that gcau
(which implements the guts of get_common_and_uncommon) was not only
horrible code, but also insufficiently lazy.  I has just been assuming that
it does the right thing, but it reads one more inventory file than it needs
to.  In this case that one extra file is huge.  Normally it would be sort
of "normal-sized" and you're only downloading something like twice what you
need.

On my computer the fptools pull drops from about 30s to less than 5s with
this patch.  :)
-- 
David Roundy
http://www.darcs.net




More information about the darcs-devel mailing list