Re: [PATCH 08/13] prevent try_delta from using objects not in pack
- From
- Dana How <danahow@gmail.com>
- Date
- Apr 6, 2007, 03:47 UTC
- Message-ID
- <56b7f5510704052047r30166e53kffbdd8bf71885264@mail.gmail.com>
- In-Reply-To
- <alpine.LFD.0.98.0704052320560.28181@xanadu.home>
On 4/5/07, Nicolas Pitre <nico@cam.org> wrote:
Show 25 quoted lines
> On Thu, 5 Apr 2007, Dana How wrote: > > On 4/5/07, Nicolas Pitre <nico@cam.org> wrote: > > > What is the purpose of this patch? > > > > > > The try_delta() function is called with all objects before any object is > > > written to a pack to find out how to deltify objects upfront. > > > > I set no_write for 2 different reasons in the patchset. > > (1) When the blob is too big (--blob-limit) and will never be written. > > (2) When the blob has been written to a previous, finished pack. > > > > You're correct that this patch will never see condition (2). > > Given that I proposed another way for big blobs in my previous email, > then (1) should not be needed either. > > > I think my repository statistics are a little unusual. > > Perhaps I'm getting ahead of myself here, > > but I also wanted to experiment with writing all blobs to one set > > of packs, and all trees, commits, and tags to another set > > (but probably just one small pack). > > I would use no_write for that and it would matter here. > > Again you should simply _not_ add objects you don't want to the list > instead of adding them and marking them as unwanted.
Agreed, the marking just required less code change at the time. I would like not to have to add nr_skipped and nr_actual.
Currently we have get_object_list -> traverse_commit_list -> show_{commit,object} -> add_object_entry , which is all called way before get_object_details -> check_object -> sha1_object_info . Can I safely move the sha1_object_info calll earlier into add_object_entry so I will know the size for pruning?
In your other email you mention memory consumption due to object_entry. This structure could benefit somewhat from some attention beyond removing my no_write.(e.g. int->short for .depth and .delta_limit; int->enum for .preferred_base). Perhaps for later.
Thanks,
-- Dana L. How danahow@gmail.com +1 650 804 5991 cell