From 08c392260f1c1157085f80ad7bcb38ef2cc589b9 Mon Sep 17 00:00:00 2001 From: Ulrich Hornung Date: Thu, 25 Jul 2024 20:53:34 +0200 Subject: [PATCH] performance5: buffered view-channels --- overlay/user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overlay/user.go b/overlay/user.go index e9a283ec5..238163a7e 100644 --- a/overlay/user.go +++ b/overlay/user.go @@ -18,8 +18,8 @@ func NewUserDevice(tunCidr *net.IPNet) (Device, error) { // these pipes guarantee each write/read will match 1:1 return &UserDevice{ tunCidr: tunCidr, - outboundChannel: make(chan *buffer.View), - inboundChannel: make(chan *buffer.View), + outboundChannel: make(chan *buffer.View, 16), + inboundChannel: make(chan *buffer.View, 16), }, nil }