[Bug 3967] New: 'or' revset is slow on large repos

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Thu Jun 20 12:32:34 CDT 2013


          Priority: normal
            Bug ID: 3967
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: 'or' revset is slow on large repos
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Reporter: durham at fb.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: 2.6.2
         Component: Mercurial
           Product: Mercurial

If I have 15 bookmarks in a large repo, the following code takes 1 second:

repo.revs("%s" % ("+".join([' "%s" ' % b for b in books])))

While this equivalent code takes 0.1 seconds.

revs = set()
for b in books:
    revs.update(repo.revs("'%s'" % b))

Profiling shows revset.py's orset() takes the vast majority of the time. 
Probably because it compares each bookmark with every commit in the subset,
which is every commit in our huge repo.

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

More information about the Mercurial-devel mailing list