Thread (7 messages) 7 messages, 4 authors, 2022-07-01

Re: [PATCH] pack-objects.h: remove outdated pahole results

From: Jeff King <hidden>
Date: 2022-07-01 21:05:23

On Fri, Jul 01, 2022 at 03:48:19PM -0400, Taylor Blau wrote:
quoted
I agree the actual numbers aren't helping anybody. We _could_ leave a
comment that says "we store a lot of these in memory; be careful of
where and how you add new fields to avoid increasing the struct size".
And then people can run "pahole" before and after their changes.

But then that is also true of other structs (like "struct object"), and
we do not bother there. So it probably is fine not to annotate this
specifically.
We have such a comment at the very type of the block comment above
`struct object_entry`'s definition:

    "The size of struct nearly determines pack-object's memory
    consumption. This struct is packed tight for that reason. When you
    add or reorder something in this struct, think a bit about this".

thanks to Duy back in 3b13a5f263 (pack-objects: reorder members to
shrink struct object_entry, 2018-04-14).
Oh, indeed. Then I withdraw my (non-)complaint. :)

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help