Re: [PATCH v2 08/10] reftable/writer: optimize allocations by using a scratch buffer
On Wed, Nov 20, 2024 at 9:07 AM Patrick Steinhardt <ps@pks.im> wrote:
Show 9 quoted lines
> diff --git a/reftable/writer.h b/reftable/writer.h
> index e8a6fbb78543e6e56920a2999601db0db9fe4d97..421a897dccd85ad0532860ff1b4f38b2813d438d 100644
> --- a/reftable/writer.h
> +++ b/reftable/writer.h
> @@ -20,6 +20,7 @@ struct reftable_writer {
> void *write_arg;
> int pending_padding;
> struct reftable_buf last_key;
> + struct reftable_buf buf;Nit: It would be nice to add a comment, so that readers don't have to
look at .c files, or the commit message, to find what this field is
used for.
> /* offset of next block to write. */
> uint64_t next;