Re: Unnecessary delay downloading multiple files (via SFTP)?
Date: Wed, 18 Feb 2009 19:56:05 +0100 (CET)
On Wed, 18 Feb 2009, Patrik Thunström wrote:
> Yes, no problem, attached to this email is a test program...
Attached to this email is my suggested patch. Using this I get no delays at
all. It'd be good to get a confirmation it does the same for you!
The problem was similar to what I guessed: we read data with libssh2 while
doing the "DO" operation for SFTP and then when we're about to start getting
data for the actual file part, the "TRANSFER" part, we wait for socket action
(in 1000ms) before doing a libssh2-read. But in this case libssh2 has already
read and buffered the data so we end up always just waiting 1000ms before we
get working on the data.
-- / daniel.haxx.se
- TEXT/x-diff attachment: sftp-perf.patch