Subject: Re: [PATCH 3/3] revision: insert unsorted, then sort in prepare_revision_walk()

From: Martin Fick <[email-masked]>
Date: Mon, 2 Apr 2012 10:49:04 -0600

On Monday, April 02, 2012 10:39:59 am Shawn Pearce wrote:
> On Mon, Apr 2, 2012 at 09:24, Martin Fick 
<[email-masked]> wrote:
> > On Saturday, March 31, 2012 04:11:01 pm René Scharfe 
wrote:
> Git can't really do the same thing as "cache the
> RevWalk". Its spawning a new process that needs to
> decompress and parse each commit object to determine its
> timestamp so the commits can be sorted into the priority
> queue. This is still an O(N) operation given N
> references.

While I suspect this has been suggested before, an ondisk 
cache of commits to timestamps would probably help here with 
large repos.  Such a cache could make even new processes 
able to create this list much quicker.  Since this cache 
would contain immutable data, even if it is out of date it 
would likely provided significant improvements by providing 
most of the timestamps leaving only a few to parse from 
newer commits?

-Martin

-- 
Employee of Qualcomm Innovation Center, Inc. which is a 
member of Code Aurora Forum