Mercurial > hg-stable
changeset 17563:46db0ec640f3
sshserver: avoid a multi-dot attribute lookup in a hot loop
This improves stream_out performance by about 3%.
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Fri, 14 Sep 2012 12:09:44 -0700 |
parents | b42b0729744d |
children | 6d0efc802856 |
files | mercurial/sshserver.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/sshserver.py Fri Sep 14 12:09:05 2012 -0700 +++ b/mercurial/sshserver.py Fri Sep 14 12:09:44 2012 -0700 @@ -71,8 +71,9 @@ self.fout.flush() def sendstream(self, source): + write = self.fout.write for chunk in source.gen: - self.fout.write(chunk) + write(chunk) self.fout.flush() def sendpushresponse(self, rsp):