async-pep icon indicating copy to clipboard operation
async-pep copied to clipboard

Scatter/gather IO API doesn't make sense yet

Open lvh opened this issue 13 years ago • 1 comments

Firstly, write_sequence currently mostly takes a list of bytes buffers. Much like writeSequence, this doesn't usually lead to any real performance gain. In order for it to actually work, you'd need iovec support, which as far as we know isn't in Python yet, or at least not in the stdlib.

Secondly, write_sequence only covers the gather half of scatter/gather. There would still need to be a data_vector_received or something for covering scatter.

There is apparently a related thing called memoryview, but supposedly that's unfinished and deeply broken.

(Reported by JP.)

lvh avatar Jun 04 '11 22:06 lvh

Can't this be implemented in the adapter layer? Feed it too much data to .write() and let it optimise this away?

jerub avatar Jun 24 '11 17:06 jerub