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
Creating this issue to explore the possibility of not creating a copy of the data while creating chunks that need to be put (at the NonBlockingRouter).
Currently, creating put chunks involves copying data from the buffer provided from the ReadableStreamChannel (the chunks themselves are implementations of AsyncWritableChannel). Since ReadableStreamChannel implementations are not allowed to overwrite/reuse buffers until they receive callbacks from the AsyncWritableChannel, it might be possible to avoid the copy.
The main problem will be the fact that the chunk size enforced at the NonBlockingRouter will not be equal to the sizes of the individual buffers received. This means that
P.1) Composite byte buffers will have to be created.
P.2) The modules downstream will have to understand these composite byte buffers (i.e. network modules).
P.3) There will be many boundary conditions (for e.g. a source buffer's data might be across chunk boundaries).
It will be useful to evaluate if this is possible (without introducing too much complexity) since avoiding the copy might translate into better performance.
The text was updated successfully, but these errors were encountered:
Creating this issue to explore the possibility of not creating a copy of the data while creating chunks that need to be put (at the
NonBlockingRouter
).Currently, creating put chunks involves copying data from the buffer provided from the
ReadableStreamChannel
(the chunks themselves are implementations ofAsyncWritableChannel
). SinceReadableStreamChannel
implementations are not allowed to overwrite/reuse buffers until they receive callbacks from theAsyncWritableChannel
, it might be possible to avoid the copy.The main problem will be the fact that the chunk size enforced at the
NonBlockingRouter
will not be equal to the sizes of the individual buffers received. This means thatP.1) Composite byte buffers will have to be created.
P.2) The modules downstream will have to understand these composite byte buffers (i.e. network modules).
P.3) There will be many boundary conditions (for e.g. a source buffer's data might be across chunk boundaries).
It will be useful to evaluate if this is possible (without introducing too much complexity) since avoiding the copy might translate into better performance.
The text was updated successfully, but these errors were encountered: