Deserializing many TypeReps may lead to high residency
- 主要言語
- Haskell
- スター
- 120
- フォーク
- 70
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Deserialized `TypeRep`s don't share any structure with each other, which can potentially waste a lot of space. For example, if I fill a giant `Set` with deserialized `Dynamic` values, the lion's share of the space could be taken up by the `TypeRep`s. One potential fix would be to maintain weak tables holding deserialized `TyCon`s and `TypeRep`s. We could use one of type `Map Fingerprint (exists a. Weak (TypeRep a))` and one of type `Map Fingerprint (Weak TyCon)`, but other sorts of maps would probably be faster. When a (perhaps recursively) deserialized `TyCon` or `TypeRep` matches one stored in the table, it would be thrown away in favor of the stored one.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、TypeRep と TyCon の値がどのようにデシリアライズされ、fingerprint がそれらをどのように識別するかを追跡します。この issue にはファイルやテストの記載がありません。再帰的にデシリアライズされた値を共有するための弱テーブルの選択肢を調査し、そのうえで、多数の Dynamic 値をロードしたときにメモリ常駐量が削減されることを示す測定方法を定義しつつ、デシリアライズの動作を維持します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- haskell
- 領域
- performance
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100