[Bug 4550] New: tags cache constantly recomputes .hgtags filenodes for filtered heads

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Tue Feb 24 07:43:21 UTC 2015


http://bz.selenic.com/show_bug.cgi?id=4550

          Priority: normal
            Bug ID: 4550
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: tags cache constantly recomputes .hgtags filenodes for
                    filtered heads
          Severity: bug
    Classification: Unclassified
                OS: All
          Reporter: gregory.szorc at gmail.com
          Hardware: All
            Status: UNCONFIRMED
           Version: unspecified
         Component: Mercurial
           Product: Mercurial

With evolve/obsolescence enabled, I'm getting horrible performance in @ (and
likely 3.3) due to excessive tags cache computation and poor interaction
between filtered and unfiltered repos.

Here's what happens:

1. run a history rewriting operation such as rebase with evolve/obsolescence
enabled
2. obsolete.py:getrevs() is called and executes a revset against an unfiltered
repository (evolve.py calls this from warnobserrors, which runs as part of many
commands)
3. tags.py:findglobaltags() is triggered via a namespace lookup (for a 20 byte
node)
4. the tags cache is computed and saved from the unfiltered repository
5. introduce a new head (e.g. `hg commit`)
6. perform an operation on a filtered repo that resolves nodes (e.g. `hg log`)
7. tags.py:findglobaltags() is triggered on a filtered repo
8. .hgtags filenodes from unfiltered heads are read from the cache
9. hidden changesets are removed from the cached heads list at
http://selenic.com/repo/hg/file/ff5caa8dfd99/mercurial/tags.py#l286
10. tags cache is saved with only .hgtags filenodes for filtered heads
11. run an operation that trigger tags cache reading against an unfiltered repo
12. watch helplessly as the .hgtags filenodes for hidden heads are recomputed

On my local Firefox repository (which has over 1000 hidden heads), this bug is
costing me dozens of seconds per occurrence. It takes absurdly long to decode
this many manifests on the large Firefox repository. I dare say it makes
Mercurial almost unusable.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list