Complexity of operations in Mercurial
dirkjan at ochtman.nl
Tue Feb 7 04:27:38 CST 2012
On Tue, Feb 7, 2012 at 10:14, Martin Geisler <mg at lazybytes.net> wrote:
> This question was asked recently on Stack Overflow:
> It's about how closed branches affect the performance. Do we have a wiki
> page (or some other reference) that details the complexity of various
> operations like 'hg commit', 'hg tag', 'hg pull'?
IIRC most of the issues here are solved by the branchheads cache that
we've had for a while now.
The idea here is that, to find tags, you need to parse contents from
the .hgtags for every head. Searching for all the heads used to be
slow, but is probably okay now. Extracting .hgtags from the manifest
and parsing it might still get slow on a really large scale. For
commit, I can't think of any issues relating to the number of heads or
branches off the top of my head. For pull, deciding what changesets to
transfer is probably harder in the face of lots of heads. The newish
sampling has probably improved the worst-case scenario here?
More information about the Mercurial-devel