mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Lionel Fourquaux offers this very simple patch to speed up SFTP,
simply by upping the packet sizes and maximum in-flight packet count. Got to be worth a try, I think! [originally from svn r6722]
This commit is contained in:
parent
5489c56a08
commit
bbec032476
4
pscp.c
4
pscp.c
@ -1887,10 +1887,10 @@ static void sink(char *targ, char *src)
|
||||
|
||||
received = 0;
|
||||
while (received < act.size) {
|
||||
char transbuf[4096];
|
||||
char transbuf[32768];
|
||||
unsigned long blksize;
|
||||
int read;
|
||||
blksize = 4096;
|
||||
blksize = 32768;
|
||||
if (blksize > (act.size - received))
|
||||
blksize = act.size - received;
|
||||
read = scp_recv_filedata(transbuf, (int)blksize);
|
||||
|
4
sftp.c
4
sftp.c
@ -1129,7 +1129,7 @@ static struct fxp_xfer *xfer_init(struct fxp_handle *fh, uint64 offset)
|
||||
xfer->offset = offset;
|
||||
xfer->head = xfer->tail = NULL;
|
||||
xfer->req_totalsize = 0;
|
||||
xfer->req_maxsize = 16384;
|
||||
xfer->req_maxsize = 1048576;
|
||||
xfer->err = 0;
|
||||
xfer->filesize = uint64_make(ULONG_MAX, ULONG_MAX);
|
||||
xfer->furthestdata = uint64_make(0, 0);
|
||||
@ -1169,7 +1169,7 @@ void xfer_download_queue(struct fxp_xfer *xfer)
|
||||
xfer->tail = rr;
|
||||
rr->next = NULL;
|
||||
|
||||
rr->len = 4096;
|
||||
rr->len = 32768;
|
||||
rr->buffer = snewn(rr->len, char);
|
||||
sftp_register(req = fxp_read_send(xfer->fh, rr->offset, rr->len));
|
||||
fxp_set_userdata(req, rr);
|
||||
|
Loading…
Reference in New Issue
Block a user