sshserver: avoid a multi-dot attribute lookup in a hot loop

This improves stream_out performance by about 3%.
This commit is contained in:
Bryan O'Sullivan 2012-09-14 12:09:44 -07:00
parent b5119e949d
commit 9c2cc273fb

View File

@ -71,8 +71,9 @@ class sshserver(object):
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):