issue #139: eliminate quadratic behaviour from transmit path

Implication: the entire message remains buffered until its last byte is
transmitted. Not wasting time on it, as there are pieces of work like
issue #6 that might invalidate these problems on the transmit path
entirely.
wip-fakessh-exit-status
David Wilson 7 years ago
parent a3b4b459fa
commit 728a0da8a4

@ -782,7 +782,7 @@ class Stream(BasicStream):
self.on_disconnect(broker) self.on_disconnect(broker)
return return
elif written != len(buf): elif written != len(buf):
self._output_buf.appendleft(buf[written:]) self._output_buf.appendleft(buffer(buf, written))
_vv and IOLOG.debug('%r.on_transmit() -> len %d', self, written) _vv and IOLOG.debug('%r.on_transmit() -> len %d', self, written)

Loading…
Cancel
Save