From: Shawn O. Pearce Date: Thu, 31 May 2007 05:02:11 GMT Subject: Re: [PATCH] always start looking up objects in the last used pack first Message-ID: <20070531050211.GV7044@spearce.org> In-Reply-To: Nicolas Pitre wrote: > Pack Sort w/o this patch w/ this patch > ------------------------------------------------------------- > recent objects last 26.4s 20.9s > recent objects first 24.9s 18.4s Looks pretty good. > + next: > + if (p == last_found) > + p = packed_git; > + else > + p = p->next; > + if (p == last_found) > + p = p->next; > + } while (p); So if we didn't find the object in the pack that we found the last object in, we restart our search with the most recent pack? Why not just go to p->next and loop around? If we missed in this pack and the packs are sorted by recency, wouldn't we want to just search the next pack? -- Shawn.