fix(socket): 调整批量读取数量以优化性能

将 ServerOption 中的 batchRead 值从 30 调整为 8,以减少单次批量读取的数据量,提高处理效率和响应速度。
This commit is contained in:
2025-10-31 01:58:16 +08:00
parent eefd368a2b
commit 4ae06f5695

View File

@@ -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 {