Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v1.18: accounts-db: fix 8G+ memory spike during hash calculation (bac…
…kport of #1308) (#1318) accounts-db: fix 8G+ memory spike during hash calculation (#1308) We were accidentally doing several thousands 4MB allocations - even during incremental hash - which added up to a 8G+ memory spikes over ~2s every ~30s. Fix by using Vec::new() in the identity function. Empirically 98%+ reduces join arrays with less than 128 elements, and only the last few reduces join large vecs. Because realloc does exponential growth we don't see pathological reallocation but reduces do at most one realloc (and often 0 because of exp growth). (cherry picked from commit 2c71685) Co-authored-by: Alessandro Decina <[email protected]>
- Loading branch information