Mercurial > hg
comparison mercurial/wireprotov2server.py @ 44861:065421e12248
files: speed up `hg files` when no flags change display
It's not the first time I see slowness from this command slow down
tools built on top of hg.
The majority of the time is spent merely printing the result before
this change, which is clearly not how it should be (especially since
the computation of the result also looks slow).
Running `hg files` in mozilla-central:
parent revision: 1,260s
this commit: 0,683s
this commit without batching ui.write: 0,931s
this commit replacing the body of the loop with `pass`: 0,566s
This looks like a prime candidate for a rust fast path, but until
then, it seems reasonable to optimize the python.
Differential Revision: https://phab.mercurial-scm.org/D8586
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Tue, 26 May 2020 08:15:09 -0400 |
parents | a61287a95dc3 |
children | 89a2afe31e82 |
comparison
equal
deleted
inserted
replaced
44860:5d77f571a563 | 44861:065421e12248 |
---|