[gvfs] daemon: Bump maximum read channel buffer size



commit 59f9c6aba513ddeeb52c11d3462bf14ca52d1302
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Nov 2 12:51:23 2016 +0100

    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

 daemon/gvfsreadchannel.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gvfsreadchannel.c b/daemon/gvfsreadchannel.c
index f219ded..b6b6a93 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;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]