Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pre-allocate vectors in SSZ decoding (#3417)
## Issue Addressed Fixes a potential regression in memory fragmentation identified by @paulhauner here: #3371 (comment). ## Proposed Changes Immediately allocate a vector with sufficient size to hold all decoded elements in SSZ decoding. The `size_hint` is derived from the range iterator here: https://github.com/sigp/lighthouse/blob/2983235650811437b44199f9c94e517e948a1e9b/consensus/ssz/src/decode/impls.rs#L489 ## Additional Info I'd like to test this out on some infra for a substantial duration to see if it affects total fragmentation.
- Loading branch information