What problem does your feature solve?
LedgerSnapshot is used extensively in contract testing. Currently, entries are accessed and updated linearly. This is particularly expensive when a large set of entries is being updated in a large snapshot using update_entries.
- Slow CI — integration test suites that call
env.ledger().snapshot() / update() across many contract invocations with large snapshots degrade non-linearly.
- Developer experience — no indication of why tests slow down as snapshot size grows.
- Fuzz / property testing — fuzzing harnesses that feed large generated snapshots can experience CPU saturation.
What would you like to see?
Accessing and updating ledger entries via a snapshot does not depend on the size of the snapshot, using something like HashMap or IndexMap.
What alternatives are there?
Leave it as-is. As long as snapshots remain reasonable in size, this is not really an issue.
What problem does your feature solve?
LedgerSnapshotis used extensively in contract testing. Currently, entries are accessed and updated linearly. This is particularly expensive when a large set of entries is being updated in a large snapshot usingupdate_entries.env.ledger().snapshot()/update()across many contract invocations with large snapshots degrade non-linearly.What would you like to see?
Accessing and updating ledger entries via a snapshot does not depend on the size of the snapshot, using something like
HashMaporIndexMap.What alternatives are there?
Leave it as-is. As long as snapshots remain reasonable in size, this is not really an issue.