# HG changeset patch # User Pierre-Yves David # Date 1507643231 -7200 # Node ID b185beb94df5b67c08afd038152fe3edbfb5c17a # Parent 033e00be9ce423e2f85646cdb0c58559650c7f01 topic: reorder revset for faster evaluation When running the revset on unfiltered repository, the mutable set can get huge. So removing the obsolete changeset first provide a large speedup. This resolve the performance regression we were seeing since the 6.7.0 release. diff -r 033e00be9ce4 -r b185beb94df5 hgext3rd/topic/stack.py --- a/hgext3rd/topic/stack.py Mon Oct 09 17:42:30 2017 +0200 +++ b/hgext3rd/topic/stack.py Tue Oct 10 15:47:11 2017 +0200 @@ -34,9 +34,9 @@ if topic is not None and branch is not None: raise error.ProgrammingError('both branch and topic specified (not defined yet)') elif topic is not None: - trevs = repo.revs("topic(%s) - obsolete()", topic) + trevs = repo.revs("not obsolete() and topic(%s) - obsolete()", topic) elif branch is not None: - trevs = repo.revs("branch(%s) - public() - obsolete() - topic()", branch) + trevs = repo.revs("not public() and branch(%s) - obsolete() - topic()", branch) else: raise error.ProgrammingError('neither branch and topic specified (not defined yet)') self._revs = trevs