You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, we dispatch substreams as soon as they are incoming / we detect them into bufferedSubStreamOutput. Instead, we can let them be pulled and query the state machine whether a stream is ready to be dispatched. In particular, this will automatically avoid allocating infrastructure for streams that might never materialize (e.g. because they are cancelled before they will be pulled).
One way to do it would be to introduce a kind of "holding position" state. In that state, we could also already start collecting incoming data (which we have to buffer anyway up to the default window size). In the best case, we have already seen endStream = true for the request side, so that we can avoid setting up the expensive streaming infrastructure (this will mean that in overload cases we will "automatically" reduce work because we collect buffers early on when there is backpressure from the stream handling flow).
The text was updated successfully, but these errors were encountered:
Right now, we dispatch substreams as soon as they are incoming / we detect them into
bufferedSubStreamOutput
. Instead, we can let them be pulled and query the state machine whether a stream is ready to be dispatched. In particular, this will automatically avoid allocating infrastructure for streams that might never materialize (e.g. because they are cancelled before they will be pulled).One way to do it would be to introduce a kind of "holding position" state. In that state, we could also already start collecting incoming data (which we have to buffer anyway up to the default window size). In the best case, we have already seen
endStream = true
for the request side, so that we can avoid setting up the expensive streaming infrastructure (this will mean that in overload cases we will "automatically" reduce work because we collect buffers early on when there is backpressure from the stream handling flow).The text was updated successfully, but these errors were encountered: