Re: [PATCH v3 1/2] pack-bitmap.c: remove unnecessary "open_pack_index()" calls
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Nov 14, 2022, 22:50 UTC
- Message-ID
- <Y3LGQ+yV1lJiWR21@nand.local>
- In-Reply-To
- <Y3LBtl+x2rCzsoIh@coredump.intra.peff.net>
On Mon, Nov 14, 2022 at 05:31:18PM -0500, Jeff King wrote:
Show 17 quoted lines
> Yeah, I agree that 1k is a lot more compelling. The big impractical > thing I think is that if the bitmapped pack is older (and it usually > is), then we'd often open all the other packs anyway: > > - if the start of the traversal is in the bitmapped pack, then we > fruitlessly open each of the others looking for the object (since > the bitmapped one will come last in the reverse-chronological > sorting) > > - if it isn't in the bitmapped pack, then we'll end up opening all > those other packs anyway to fill out the bitmap (since by definition > it can't be included in the on-disk bitmaps) > > So I'd be surprised if it ever mattered in the real world. Though again, > I think the new code is less surprising in general, and could matter if > we changed other things (e.g., if we prioritized lookups in a pack with > a .bitmap).
I completely agree. It's definitely worth doing purely based on the principle of least-surprise. But the potential performance improvements are just gravy on top ;-).
Thanks, Taylor