HomePhabricator

revset: detect integer list on parsing

Authored by lothiraldan.

Description

revset: detect integer list on parsing

Right now, using "%ld" with repo.revs("…%ld…", somerevs) is very
inefficient, all items in somerevs will be serialized to ascii and then
reparsed as integers. If somerevs contains just an handful of entry this is
fine, however, when you get to thousands or hundreds of thousands of revisions
this becomes very slow.

To avoid this serialization we need to first detect this situation. The code
involved in the whole process is quite complex so we start simple and focus on
some "simple" but widespread cases.

So far we only detect the situation and don't do anything special about it.
The singled out will be serialized in formatspec in the same way as before.

Details

Committed
lothiraldanJan 3 2019, 11:26 PM
Parents
rHG8d26026b3335: revert: extract "%ld" formatting in a _formatintlist function
Branches
Unknown
Tags
Unknown