Page MenuHomePhabricator

Rewrite the socket functions to use writev() and readv()
Open, WishlistPublic

Description

In order to improve memory management and reduce allocations, we should start moving to writev() and readv(). For Windows there is WSASend() and WSARecv() which works with a WSABUF array.

The first task would be to use it in src/socket.c, then we need to think about how we can rewrite the buffer API to match io vectors.

Event Timeline

asn triaged this task as Wishlist priority.Sep 4 2018, 8:10 PM
asn created this task.
asn added a subscriber: ansasaki.
asn added a comment.Sep 4 2018, 8:20 PM

Once we have writev(), it is probably easy to get rid of ssh_buffer_prepend() which should give use quite some performance improvement!