From: Jon Smirl Date: Mon, 10 Dec 2007 05:23:36 GMT Subject: Re: [PATCH 2/2] pack-objects: fix threaded load balancing Message-ID: <9e4733910712092123r6987c3edua74a15890ae45a3d@mail.gmail.com> In-Reply-To: <9e4733910712092030j5cf7dfdcrb3a003fbce391422@mail.gmail.com> On 12/9/07, Jon Smirl wrote: > > + 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 loop Copying 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 ... > > > + sub_size--; > > + } > > + target->list = list; > > + victim->list_size -= sub_size; > > + victim->remaining -= sub_size; > > + } -- Jon Smirl jonsmirl@gmail.com