Issue summary
The blockstore backed by an uncompressed CAR file uses two HashMaps with CIDs as keys: One map for the write cache and one map for the index. These maps should be replaced with CidHashMap, which uses less memory. Memory usage when validating a snapshot should be measured before and after the change.
Acceptance criteria:
Other information and links
|
write_cache: ahash::HashMap<Cid, Vec<u8>>, |
|
index: ahash::HashMap<Cid, UncompressedBlockDataLocation>, |
Issue summary
The blockstore backed by an uncompressed CAR file uses two
HashMaps with CIDs as keys: One map for the write cache and one map for the index. These maps should be replaced withCidHashMap, which uses less memory. Memory usage when validating a snapshot should be measured before and after the change.Acceptance criteria:
CidHashMapHashMap<Cid, V>withCidHashMap<V>incar/plain.rs/usr/bin/time -v forest-cli snapshot validate {snapshot}.carOther information and links
forest/src/db/car/plain.rs
Lines 152 to 153 in 6dbd776