coder / coder/websocket

docs: Rationalize wsjson buffer pooling and explain tradeoffs

オープン
#418 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る
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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。