Re: .git/info/refs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 24 Jan 2007, H. Peter Anvin wrote:

> Jakub Narebski wrote:
> > H. Peter Anvin wrote:
> > 
> > > Would it be an incompatible change to add the commit date (and perhaps the
> > > author date) to .git/info/refs?  I believe that would make it possible to
> > > dramatically (orders of magnitude) speed up the generation of the gitweb
> > > index page, which is easily the most expensive gitweb page to generate.
> > 
> > With new gitweb and new git it is not that expensive. It is now one call
> > to git-for-each-ref per repository.
> 
> That IS hugely expensive.  On kernel.org, that is 24175 calls to git.
> 
> > Besides, we can't rely that .git/info/refs is up to date, or even exists.
> > It is for dumb protocols, not for gitweb.
> 
> Well, SOMETHING needs to be done for this page, since it can take 15 
> minutes or more to generate.  Caching doesn't help one iota, since it's 
> stale before being generated.

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.)

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]