Why is hg identify so slow?

Matt Mackall mpm at selenic.com
Wed Jun 25 12:02:59 CDT 2008


On Wed, 2008-06-25 at 17:52 +0100, Frank A. Kingswood wrote:
> Frank A. Kingswood wrote:
> > Shun-ichi GOTO wrote:
> >>> I've noticed several times in the past that hg identify is quite slow
> >>> compared to hg status. It would seem to me that hg identify actually has
> >>> slightly less to do - no need to print out modified or unknown files.
> >> If your repository has large number of revisions, it may hit  issue 557 / 548.
> >> http://www.selenic.com/mercurial/bts/issue557
> >> http://www.selenic.com/mercurial/bts/issue548
> >>
> >> In my case (issue 548), repository is emacs:
> >> Here is a result on the repository:
> > 
> > Issue 557 suggests this is because of the number of tags.
> > My repository has about 500 tags, and about 18K revisions.
> 
> As I was already doing a new conversion from CVS I've made sure that no 
> tags were converted. Running the new repository (on a local filesystem) 
> I still see hg identify (without --id) taking about twice as long as hg 
> status or hg identify --id.

Nonetheless, Mercurial has to find all heads in the changelog and
examine each associated manifest for a .hgtags file. That makes looking
up tags (whether they exist or not) a fairly expensive operation.

We know how to fix this: add a tags cache to parallel the branch cache.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list