[Updated] D8586: files: speed up `hg files` when no flags change display
valentin.gatienbaron (Valentin Gatien-Baron)
phabricator at mercurial-scm.org
Tue May 26 16:24:06 UTC 2020
valentin.gatienbaron added inline comments.
valentin.gatienbaron marked 2 inline comments as done.
INLINE COMMENTS
> joerg.sonnenberger wrote in cmdutil.py:2760
> The normal idiom for batches uses a list and a single join at time of writing. Not sure if there are repositories where we care about the size of the temporary buffer enough to flush it in the middle.
Using a list is fine (and in fact, it has the advantage of reusing memory). I tried one big join at the end but it's slightly slower, and it make `hg files | head -n 1` 100ms slower, probably because the iterator gets fully evaluated.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8586/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8586
To: valentin.gatienbaron, #hg-reviewers, marmoute
Cc: marmoute, joerg.sonnenberger, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200526/33c1d9e7/attachment-0002.html>
More information about the Mercurial-patches
mailing list