Re: [PATCH 2/2] pack-objects: fix threaded load balancing
- From
Jon Smirl <jonsmirl@gmail.com>
- Date
- Dec 10, 2007, 05:23 UTC
- Message-ID
- <9e4733910712092123r6987c3edua74a15890ae45a3d@mail.gmail.com>
- In-Reply-To
- <9e4733910712092030j5cf7dfdcrb3a003fbce391422@mail.gmail.com>
On 12/9/07, Jon Smirl <jonsmirl@gmail.com> wrote:
Show 8 quoted lines
> > + if (victim) {
> > + sub_size = victim->remaining / 2;
> > + list = victim->list + victim->list_size - sub_size;
> > + while (sub_size && list[0]->hash &&
> > + list[0]->hash == list[-1]->hash) {
> > + list++;
>
> I think you needed to copy sub_size to another variable for this loopCopying sub_size was wrong. I believe you are checking for deltas on the same file. It's probably that chain of 103,817 deltas that can't be broken up.
ChainLength Objects Cumulative 1: 103817 103817 2: 67332 171149 3: 57520 228669 4: 52570 281239 5: 43910 325149 6: 37520 362669 7: 35248 397917 8: 29819 427736 9: 27619 455355 10: 22656 478011 11: 21073 499084 ...
Show 7 quoted lines
> > > + sub_size--; > > + } > > + target->list = list; > > + victim->list_size -= sub_size; > > + victim->remaining -= sub_size; > > + }
-- Jon Smirl jonsmirl@gmail.com