[darcs-users] darcs-benchmark

Petr Rockai me at mornfall.net
Mon Oct 19 21:43:57 UTC 2009

Zooko Wilcox-O'Hearn <zooko at zooko.com> writes:
> So, it might be possible for Trac-Darcs to be even cleverer to optimize this
> sort of thing, but something that darcs could do better  would be to optimize
> this "darcs query contents --match" operation.

For this sort of operation, it would be faster if you could say darcs dump
contents --match "hash ..." c5/salsa.h c5/pubkey.h c5/randpool.cpp ... or so --
it would take roughly the same time as each of these operations, but doing it
all in one go, dumping the respective files somewhere. Probably an O(n)
speedup. Another option would be to be able to say darcs optimize
--cache-pristine --match "hash ..." which would give you back an alternative
pristine root pointer which you could then somehow pass into darcs show
contents instead of using a matcher there.

Yet another would be to ask darcs to store all pristines corresponding to
"matchable" states of the repository -- basically all those inbetween the
patches in the inventory order -- and add a "pristine" matcher that'd match on
the pristine root hash, etc.

Please note that these approaches go from the most realistic to the most
sci-fi. The first would be fairly easy to implement, although it is really an
appalling hack. The last is approaching an useful general-purpose feature but
is pretty hard to fit into darcs without going crude and ugly.


More information about the darcs-users mailing list