Subject: [PATCH 0/7] reftable: fixes and optimizations (pt.2)

From: Patrick Steinhardt <[email-masked]>
Date: Wed, 20 Dec 2023 10:17:01 +0100

Hi,

this is the second set of patches that fixes bugs and performs some
slight memory optimizations. The series builds on top of c0cadb0576,
which has been merged to `next`.

The series is structured as follows:

  - Patch 1: some hardening to not corrupt the reftable stack on
    compaction.

  - Patch 2: fix corruption of a reftable when writing multiple indices.

  - Patches 3 - 7: various smallish refactorings to optimize memory
    usage. Overall these reduce allocations when iterating many refs by
    almost 85%.

Thanks in advance for your review!

Patrick

Patrick Steinhardt (7):
  reftable/stack: do not overwrite errors when compacting
  reftable/writer: fix index corruption when writing multiple indices
  reftable/record: constify some parts of the interface
  reftable/record: store "val1" hashes as static arrays
  reftable/record: store "val2" hashes as static arrays
  reftable/merged: really reuse buffers to compute record keys
  reftable/merged: transfer ownership of records when iterating

 reftable/block_test.c      |   4 +-
 reftable/merged.c          |   8 +--
 reftable/merged_test.c     |  16 +++---
 reftable/readwrite_test.c  | 103 +++++++++++++++++++++++++++++++------
 reftable/record.c          |  17 ++----
 reftable/record_test.c     |   5 --
 reftable/reftable-record.h |  10 ++--
 reftable/stack.c           |  20 +++----
 reftable/stack_test.c      |   2 -
 reftable/writer.c          |   4 +-
 10 files changed, 117 insertions(+), 72 deletions(-)

base-commit: c0cadb0576d4920915eb3bd38a7d1abfcbd25f98
-- 
2.43.GIT