cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: set a larger sftp buffer size

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 14 Aug 2007 12:40:44 +0200 (CEST)

On Tue, 14 Aug 2007, Peter O'Gorman wrote:

(I'm cc'ing this reply over to the curl-library list since I think it is
better suited for discussion on that list.)

> We'd like to use a significantly larger buffer size when doing sftp://
> transfers (the speed up is impressive).
>
> It looks like this is based on the BUFSIZE define, however, we'd rather not
> change it for all protocols.
>
> Is there an "easy" way to do this, or do we have to read a large amount in
> ssh.c and feed it to Curl_client_write et. al. in blocks no larger then
> BUFSIZE?

I figure we need to introduce a way to get a larger download buffer when a
specific protocol (such as sftp and scp?) is used. Currently the buffer is
part of the SessionHandle struct but we'd need to make it get allocated
separately and then realloc() on demand for this kind of situation.

CURL_MAX_WRITE_SIZE in include/curl.h would also need to be bumped to have the
largest possible size.

You in the mood to work on a patch for this?

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-08-14