joerg.sonnenberger created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers.
REVISION SUMMARY It is more efficient to pass down one large string to the output streams than many small ones. For a ``hg diff`` test case, it improves time from 2m26s to 2m8s. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1939 AFFECTED FILES mercurial/ui.py CHANGE DETAILS diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -928,8 +928,7 @@ # opencode timeblockedsection because this is a critical path starttime = util.timer() try: - for a in msgs: - self.fout.write(a) + self.fout.write(''.join(msgs)) except IOError as err: raise error.StdioError(err) finally: To: joerg.sonnenberger, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel