Re: .git/info/refs
- From
- H. Peter Anvin <hpa@zytor.com>
- Date
- Jan 24, 2007, 16:24 UTC
- Message-ID
- <45B78836.5080508@zytor.com>
- In-Reply-To
- <Pine.LNX.4.63.0701241658490.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin wrote:
Show 12 quoted lines
> > To me, it seems like all boils down to caching parsed data structures. > I.e. parse the config, then serialize the parsed data to a file. Don't > reparse the config unless it is 1 hour older than the config. > > Likewise, run for-each-ref, and serialize the parsed data into a file. > Don't rerun for-each-ref if that file is younger than 15 minutes. > > Maybe the same for the first 200 commits of each branch. > > (I made those times up, but you get the idea.) >
A much better idea is to have that data structure updated on repository updates, which is the whole point behind .git/info/refs. On kernel.org, at least, if you don't keep .git/info/refs up to date you need to get your fingers whacked anyway, since it damages usability for one particular class of users.
-hpa