Message305836
>> I've a few ideas how to add 0-copy support to protocols.
> I'd be interesting to hear about them. The main challenge IMHO is to find a way to allow a readinto()-like functionality.
Exposing sendfile() should be straightforward. I started implementing it years ago but I gave up pretty soon because asyncio had no solid test framework for testing an actual data transfer between two sockets and that basically represented a blocker. Basically back then all recv() / send() related tests were mocks. Not sure about the current situation but if that has changed I would be happy to contribute a PR (I was the one who contributed socket.sendfile()).
As for a readinto()-like functionality: the only thing I'm aware of is splice() syscall but it's Linux only. It must be noted that also sendfile() is UNIX only. Windows achieve the same via TransmitFile. |
|
Date |
User |
Action |
Args |
2017-11-08 13:40:21 | giampaolo.rodola | set | recipients:
+ giampaolo.rodola, pitrou, vstinner, asvetlov, yselivanov |
2017-11-08 13:40:21 | giampaolo.rodola | set | messageid: <1510148421.2.0.213398074469.issue31970@psf.upfronthosting.co.za> |
2017-11-08 13:40:21 | giampaolo.rodola | link | issue31970 messages |
2017-11-08 13:40:21 | giampaolo.rodola | create | |
|