[lxc-devel] [lxd/master] use default buffer size for WebsocketUpgrader

tych0 on Github lxc-bot at linuxcontainers.org
Tue May 24 23:20:05 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 709 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160524/808549ca/attachment.bin>
-------------- next part --------------
From b98bc191eca1f5542db396a797ae9a5d7f22b469 Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho.andersen at canonical.com>
Date: Tue, 24 May 2016 16:53:27 -0600
Subject: [PATCH] use default buffer size for WebsocketUpgrader

Let's use the default for this now so we do less copying. In my tests this
doesn't make a huge difference, but it does shave 2 seconds off of a 50
second or so transfer on average. Presumably bumping this higher when we
know we're going to be dumping a lot of data is a good idea, but that's for
a later set when I've done more experiments.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 shared/operation.go | 2 --
 1 file changed, 2 deletions(-)

diff --git a/shared/operation.go b/shared/operation.go
index dabd720..fff3759 100644
--- a/shared/operation.go
+++ b/shared/operation.go
@@ -8,8 +8,6 @@ import (
 )
 
 var WebsocketUpgrader = websocket.Upgrader{
-	ReadBufferSize:  1024,
-	WriteBufferSize: 1024,
 	CheckOrigin:     func(r *http.Request) bool { return true },
 }
 


More information about the lxc-devel mailing list