Nicolas Dumazet <nicdumz.commits@gmail.com> [Mon, 23 Mar 2009 15:32:29 +0100] rev 7883
revlog: faster hash computation when one of the parent node is null
Because we often compute sha1(nullid), it's interesting to copy a precomputed
hash of nullid instead of computing everytime the same hash. Similarly, when
one of the parents is null, we can avoid a < comparison (sort).
Overall, this change adds a string equality comparison on each hash() call,
but when p2 is null, we drop one string < comparison, and copy a hash instead
of computing it. Since it is common to have revisions with only one parent,
this change makes hash() 25% faster when cloning a big repository.
Nicolas Dumazet <nicdumz.commits@gmail.com> [Mon, 23 Mar 2009 15:36:30 +0100] rev 7882
ancestor: caching the parent list to improve performance
When computing the DAG depth, we walk through all ancestors: this commit adds
memoization during that first step. Then, the memorized parents are fetched
from a dict instead of calling parents() on each vertex.
This tweak, according to Kcachegrind, improves ancestor() performance by 16%
when cloning a big repository.
Dirkjan Ochtman <dirkjan@ochtman.nl> [Mon, 23 Mar 2009 13:49:16 +0100] rev 7881
kill another trailing space
Dirkjan Ochtman <dirkjan@ochtman.nl> [Mon, 23 Mar 2009 13:43:48 +0100] rev 7880
add debugcommands command: an easy to parse command + option index