Subject: curl / libssh2 sftp write performance (with patch)

curl / libssh2 sftp write performance (with patch)

From: Daniel Jeliński <djelinski1_at_gmail.com>
Date: Sun, 26 Aug 2018 00:55:55 +0200

Hello all,
I took a look at curl performance when uploading data to sftp servers;
curl is internally using a fixed-size buffer, which is only refilled
when completely acknowledged by sftp write function. This creates a
performance bottleneck on high-latency links, as there's a pause in
upload every time curl is waiting for acknowledgements.

I propose a change implemented in
https://github.com/libssh2/libssh2/pull/264, where sftp write
acknowledges data as soon as it is sent to the server, and checks
server response when it becomes available, which may happen during
sftp close.

I realize that this is a breaking change - many code examples do not
even check the result of sftp close, which means that a lot of code in
the wild would probably break if the patch was accepted in its current
form.
Would a patch like that be acceptable? What needs to happen to get it accepted?
Thanks,
Daniel
_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2018-08-26