From 4ae06f56953833dd928bf37dfec0ab44d381b67c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E5=BF=B5?= <1@72wo.cn> Date: Fri, 31 Oct 2025 01:58:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(socket):=20=E8=B0=83=E6=95=B4=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E8=AF=BB=E5=8F=96=E6=95=B0=E9=87=8F=E4=BB=A5=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 ServerOption 中的 batchRead 值从 30 调整为 8,以减少单次批量读取的数据量,提高处理效率和响应速度。 --- common/socket/ServerOption.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/socket/ServerOption.go b/common/socket/ServerOption.go index 1bdc5f7b..7653e798 100644 --- a/common/socket/ServerOption.go +++ b/common/socket/ServerOption.go @@ -38,7 +38,7 @@ func NewServer(options ...Option) *Server { workerPool: goroutine.Default(), bufferSize: 4096, //默认缓冲区大小 multicore: true, - batchRead: 30, + batchRead: 8, //discorse: true, } for _, option := range options {