docs: Rationalize wsjson buffer pooling and explain tradeoffs
未关闭
docs
- 主要语言
- Go
- 星标
- 5.5k
- 派生
- 372
- PR 合并指标
- 30 天内没有已合并 PR
描述
I see that this library is using `sync.Pool` to pool buffers for wsjon sub-package. `sync.Pool` is suitable only for pooling objects of same size. If they are of different size, you have a problem: those buffers will just grow and grow never to shrink.
See https://github.com/golang/go/issues/23199 for more background.
贡献指南
这个仓库没有索引到贡献指南
调研方向
定位 wsjson 子包及其 sync.Pool 缓冲区实现,然后阅读关于池化不同大小对象的链接 Go issue。确定当前的缓冲区大小行为,并记录现有池化方法的权衡。池化策略得到合理化说明并且其局限性得到解释,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- go
- 领域
- networking
- Issue 类型
- 重构
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100