cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Unnecessary delay downloading multiple files (via SFTP)?

From: Patrik Thunström <patrik.thunstrom_at_bassetlabs.com>
Date: Thu, 19 Feb 2009 09:45:17 +0100

Daniel Stenberg wrote:
> 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.
Works very nicely on my end, both in the small test application I gave
the source for as well as the proper application where I use it. Delay
is nowhere to be seen, as it now spends it time transferring files instead.

As mentioned earlier I currently only use libcurl for SFTP, so that's
the only protocol I can say anything about, but I guess that a drive
through the test suite already have ensured you that it did not break
things elsewhere...

Thank you very much for the help with the issue!

Best regards
Patrik Thunström
Received on 2009-02-19