diff options
author | Bastien Nocera <hadess@hadess.net> | 2016-11-02 12:51:23 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-01-03 13:34:42 +0100 |
commit | 0ecac6bb2ee67c788abacadebd7bd3be3b665855 (patch) | |
tree | 32af175ad8c2ad99ce1abb7949fb5e5ea8a7d9f2 | |
parent | c5cbf43e8e7168f7b16bdd334c77333c98c4604d (diff) | |
download | gvfs-0ecac6bb2ee67c788abacadebd7bd3be3b665855.tar.gz |
daemon: Bump maximum read channel buffer size
256k isn't in the "stupid" buffer size for network reads, so bump the
maximum size of the read buffer.
See https://bugzilla.gnome.org/show_bug.cgi?id=773632
See https://bugzilla.gnome.org/show_bug.cgi?id=773823
https://bugzilla.gnome.org/show_bug.cgi?id=773826
-rw-r--r-- | daemon/gvfsreadchannel.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/daemon/gvfsreadchannel.c b/daemon/gvfsreadchannel.c index f219ded2..b6b6a934 100644 --- a/daemon/gvfsreadchannel.c +++ b/daemon/gvfsreadchannel.c @@ -118,16 +118,18 @@ modify_read_size (GVfsReadChannel *channel, real_size = 16*1024; else if (channel->read_count <= 4) real_size = 32*1024; - else + else if (channel->read_count <= 5) real_size = 64*1024; + else + real_size = 128*1024; if (requested_size > real_size) real_size = requested_size; /* Don't do ridicoulously large requests as this is just stupid on the network */ - if (real_size > 128 * 1024) - real_size = 128 * 1024; + if (real_size > 256 * 1024) + real_size = 256 * 1024; return real_size; } |