summaryrefslogtreecommitdiff
path: root/daemon/gvfsreadchannel.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2016-11-02 12:51:23 +0100
committerBastien Nocera <hadess@hadess.net>2017-01-03 13:31:56 +0100
commit59f9c6aba513ddeeb52c11d3462bf14ca52d1302 (patch)
tree2830ded62c2c30ade5b40ec58eea46e732e927e0 /daemon/gvfsreadchannel.c
parent452dc8bb84c382962967593e3427945de702a9d5 (diff)
downloadgvfs-59f9c6aba513ddeeb52c11d3462bf14ca52d1302.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
Diffstat (limited to 'daemon/gvfsreadchannel.c')
-rw-r--r--daemon/gvfsreadchannel.c8
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;
}