From: Nicolas Pitre Date: Mon, 23 Mar 2009 14:41:11 GMT Subject: Re: Summer of Code - Cached Packs/Object Lists Message-ID: In-Reply-To: <20090323025244.GO23521@spearce.org> On Sun, 22 Mar 2009, Shawn O. Pearce wrote: > Thomas Coppi wrote: > > On Sun, Mar 22, 2009 at 7:59 PM, Shawn O. Pearce wrote: > >> You could do both. ??But I think most people on the list will argue > >> that doing both is overkill and only one is necessary, and further, > >> that only the one that offers the "biggest bank for the buck" > >> should be implemented. > > > > Alright, that seems reasonable. Given that I think I would lean > > towards implementing an object list caching mechanism, since that seems > > to be more generally applicable. The logic for this would then need to > > be in the rev-list code(as mentioned in the JGit discussion), correct? > > Probably. IIRC upload-pack forks a rev-list to produce the > object list, and pipes that into the forked pack-objects' stdin. > Thus rev-list is probably what would need to know how to include > the cached list to its output. Related to this, the first optimization is probably to avoid the fork altogether. The pack-objects code knows how to list objects by itself already, and that is used by git-repack. At the moment, packed tree objects during a fetch are probably accessed one extra time needlessly. Nicolas