discovery: compute newly discovered missing in a more efficient way
Calling "descendants" is expensive, instead, we bound the walk inside the know set
of undecided revision.
This help with discovery performance:
# without the revset '%ld' improvement
$ hg perfdiscovery -R pypy-left pypy-right
before: wall 0.675631 comb 0.680000 user 0.670000 sys 0.010000 (median of 15)
after: wall 0.520145 comb 0.530000 user 0.510000 sys 0.020000 (median of 19)
There is another series in flight that greatly improves performances of "%ld"
substitution in `repo.revs` call. If this changeset is applied above it, we
see a similar performance boost.
# with the revset '%ld' improvement
$ hg perfdiscovery -R pypy-left pypy-right
before: wall 0.477848 comb 0.480000 user 0.480000 sys 0.000000 (median of 22)
after: wall 0.404163 comb 0.400000 user 0.400000 sys 0.000000 (median of 24)
Our full contribution guidelines are in our wiki, please see:
https://www.mercurial-scm.org/wiki/ContributingChanges
If you just want a checklist to follow, you can go straight to
https://www.mercurial-scm.org/wiki/ContributingChanges#Submission_checklist
If you can't run the entire testsuite for some reason (it can be
difficult on Windows), please at least run `contrib/check-code.py` on
any files you've modified and run `python contrib/check-commit` on any
commits you've made (for example, `python contrib/check-commit
273ce12ad8f1` will report some style violations on a very old commit).