3ebfeb09fe
The ancients variable in the freezer is a list of hashes, which identifies all of the hashes to be frozen. The slice is being allocated with a capacity of `limit`, which is the number of the last block this batch will attempt to add to the freezer. That means we are allocating memory for all of the blocks in the freezer, not just the ones to be added. If instead we allocate `limit - f.frozen`, we will only allocate enough space for the blocks we're about to add to the freezer. On mainnet this reduces usage by about 320 MB. |
||
---|---|---|
.. | ||
accessors_chain_test.go | ||
accessors_chain.go | ||
accessors_indexes_test.go | ||
accessors_indexes.go | ||
accessors_metadata.go | ||
accessors_snapshot.go | ||
chain_iterator_test.go | ||
chain_iterator.go | ||
database.go | ||
freezer_table_test.go | ||
freezer_table.go | ||
freezer.go | ||
schema.go | ||
table_test.go | ||
table.go |