Re: [PATCH v2 10/10] reftable/block: optimize allocations by using scratch buffer
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Nov 20, 2024, 10:22 UTC
- Message-ID
- <CAP8UFD2hjbmqkKcx+8=6uMmaXOZJbL4kJ8X9HtniuRsX=-=rtw@mail.gmail.com>
- In-Reply-To
- <20241120-pks-refs-optimize-migrations-v2-10-a233374b7452@pks.im>
On Wed, Nov 20, 2024 at 8:56 AM Patrick Steinhardt <ps@pks.im> wrote:
Show 9 quoted lines
> diff --git a/reftable/block.h b/reftable/block.h
> index b3f837d612a8f0fbe98430b04e2dddaa975a15ab..d76f00553073c10185e716e71e2f415ce5dcf7e2 100644
> --- a/reftable/block.h
> +++ b/reftable/block.h
> @@ -39,6 +39,7 @@ struct block_writer {
> uint32_t restart_cap;
>
> struct reftable_buf last_key;
> + struct reftable_buf buf;Nit (similar as for patch 8/10): 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.
> int entries; > };