fix(socket): 调整批量读取数量以优化性能
将 ServerOption 中的 batchRead 值从 30 调整为 8,以减少单次批量读取的数据量,提高处理效率和响应速度。
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user