Skip to content

reftable: optimize block iterator memory allocations

Patrick Steinhardt requested to merge pks-reftable-block-iter-optimizations into master

Preceding patch series have tried to optimize memory allocation patterns when iterating through ref or log records. This has led to a constant number of allocations when decoding and yielding those records to our callers. One thing that is still missing though is an optimization for the table and block iterators which are responsible for iterating through the separate blocks in the table. So while the number of allocations does not scale with the number of refs (directly) anymore, it still scales with the number of blocks.

This is getting tackled by this patch series now which refactors the table and block iterators such that the former can reuse the latter without reallocations. With this change iterating through records is now using a truly constant number of allocations.

Closes reftable: allocations scale with number of bloc... (#285 - closed).

Edited by Patrick Steinhardt

Merge request reports