demandimport: make module ignores a set (API)
The list of modules to ignore is used for membership testing. Yet it is defined as a list. Sets are more efficient for membership testing. So this commit converts the module list to a set. Since we took an API hit, I renamed the variable to further clarify the change. This appears to reduce the CPU time for running 300 invocations of `hg log -r. -T '{rev}'` on my i7-6700K: before: 18.64s after: 18.44s Differential Revision: https://phab.mercurial-scm.org/D3440
Showing
- hgdemandimport/__init__.py 7 additions, 8 deletionshgdemandimport/__init__.py
- hgdemandimport/demandimportpy2.py 6 additions, 6 deletionshgdemandimport/demandimportpy2.py
- hgdemandimport/demandimportpy3.py 5 additions, 5 deletionshgdemandimport/demandimportpy3.py
- hgext/convert/bzr.py 1 addition, 1 deletionhgext/convert/bzr.py
- hgext/highlight/highlight.py 1 addition, 1 deletionhgext/highlight/highlight.py
Please register or sign in to comment