Page MenuHomePhabricator

demandimport: make module ignores a set (API)
ClosedPublic

Authored by indygreg on May 5 2018, 9:58 PM.

Details

Summary

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

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.May 5 2018, 9:58 PM
martinvonz accepted this revision.May 6 2018, 12:14 AM
This revision is now accepted and ready to land.May 6 2018, 12:14 AM
This revision was automatically updated to reflect the committed changes.