Re: [PATCH 1/3] Lazily open pack index files on demand
- From
- Dana How <danahow@gmail.com>
- Date
- May 27, 2007, 04:31 UTC
- Message-ID
- <56b7f5510705262131g2d4186a0q605abbcea624d42d@mail.gmail.com>
- In-Reply-To
- <alpine.LFD.0.99.0705262223540.3366@xanadu.home>
On 5/26/07, Nicolas Pitre <nico@cam.org> wrote:
Show 12 quoted lines
> On Sat, 26 May 2007, Dana How wrote: > > (1) git-repack -a -d repacks everything on each call. You would need: > > (1a) Rewrite builtin-pack-objects.c so only the object_ix hash > > accesses the "objects" array directly, everything else > > goes through a pointer table. > > (1b) Sort the new pointer table by object type, in order > > tag -> commit -> tree -> nice blob -> naughty blob. > > The sort is stable so the order within each group is unchanged. > > Because commit objects are so fundamental to many graph operations they > are already all packed together. But tree and blob objects are > intermixed for the reason stated above.
I noticed that all the commits were together and wondered if that was deliberate.
> The naughty blob is a really special category and I think they should be > treated as such. Therefore I don't think the common/normal case should > be impacted with a generic change for something that is still a special > case.
This argument makes sense.
Show 5 quoted lines
> In other words, I think the naughty blob could simply be recognized as > such and be referenced in a special list instead of being written out > initially. Then when everything is believed to be written, the special > list can be walked to force write those naughty blob at last. No need > to modify the current object order.
This works as long as a naughty blob can't be a delta base for a nice blob (causing it to be pushed out early by the recursion in write_one()). I think that's a reasonable and understandable restriction.
Thanks,
-- Dana L. How danahow@gmail.com +1 650 804 5991 cell