This is an archive of the discontinued Mercurial Phabricator instance.

phases: fix performance regression with Python 2.
ClosedPublic

Authored by joerg.sonnenberger on Sep 23 2020, 8:44 AM.

Details

Summary

Unlike Python 3, xrange doesn't support efficient "in" and uses a linear
time scan instead. Expand the condition to handle it fast.

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.