mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
sshserver: avoid a multi-dot attribute lookup in a hot loop
This improves stream_out performance by about 3%.
This commit is contained in:
parent
b5119e949d
commit
9c2cc273fb
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user