comparison mercurial/wireprotov2peer.py @ 39435:1467b6c27ff9

wireprotov2peer: add TODO about streaming responses This is a pretty big deficiency in the current implementation. We don't want to forget about this. Differential Revision: https://phab.mercurial-scm.org/D4435
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 22 Aug 2018 10:29:30 -0700
parents 3ea8323d6f95
children c734a5c82f38
comparison
equal deleted inserted replaced
39434:4971c9724206 39435:1467b6c27ff9
134 'never told about this request: %r' % frame) 134 'never told about this request: %r' % frame)
135 135
136 response = self._responses[frame.requestid] 136 response = self._responses[frame.requestid]
137 137
138 if action == 'responsedata': 138 if action == 'responsedata':
139 # This buffers all data until end of stream is received. This
140 # is bad for performance.
141 # TODO make response data streamable
139 response.b.write(meta['data']) 142 response.b.write(meta['data'])
140 143
141 if meta['eos']: 144 if meta['eos']:
142 # If the command has a decoder, resolve the future to the 145 # If the command has a decoder, resolve the future to the
143 # decoded value. Otherwise resolve to the rich response object. 146 # decoded value. Otherwise resolve to the rich response object.