Performance question on tags and named branches
Alistair Bell
alistair.bell at netronome.com
Thu Oct 15 18:17:33 CDT 2009
Hi all,
We have used Mercurial for some development over the past 18 months, and
we've had a lot of success, but we've had a number of performance issues
with it. A lot of this was to do with the workflow we used, where
essentially every checkin included a merge of heads.
So I'm planning to switch us from a system where people work on
anonymous branches to a system where people work on named branches
(probably branches named automatically on checkout by the script that
creates a new clone) and we don't bother merging the heads. But we still
want to be able to tag each successful build from the build system. (The
build system will be the only user authorized to update the default
branch -- we'll stick a commit hook in our central repo to enforce this.)
Which leads to the problem: my understanding is that any time tags are
consulted, Mercurial builds a union of the .hgtags files at the head of
every named branch. We currently have about 13,000 tags in our repo, and
tag performance isn't a big deal right now -- but once we have over 100
named branches, I'm guessing we might start hitting performance issues.
Am I worrying too much? Can Mercurial deal with (say) 20,000 tags in 200
named branches? (Obviously most of the tags will be identical because
they will come from a time before the branch diverged, but I assume that
Mercurial will still need to consult every named branch to know that.)
What is the procedure if different named branches have the same tag
referring to different revisions? (For instance, if we have a
PASSED_REGRESSION tag on the default branch that moves every time we
pass regression, but of course that won't update a branch's tag file.)
I don't particularly want to move to bookmarks, because half the point
is being able to share tags automatically between users, but before I
commit us to a named branch system, I want to see if anyone has looked
at this in terms of performance.
Thanks
Alistair
More information about the Mercurial
mailing list