git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: .git/info/refs

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 24, 2007, 16:38 UTC
Message-ID
<Pine.LNX.4.63.0701241731400.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<45B78836.5080508@zytor.com>
Hi,
On Wed, 24 Jan 2007, H. Peter Anvin wrote:
Show 19 quoted lines
> Johannes Schindelin wrote:
> > 
> > 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.

Granted, for some things this might work. However, I would not wreak havoc by changing the format of .git/info/refs, rather put the details you wanted into .git/info/refs-details.

However, for other things (like showing a certain number of commits), it _might_ make sense to cache them (e.g. when literally thousands of people look at the 100 last commits of linux-2.6.git), but not for others (e.g. the 100th last to the 200th last commit of git-tools.git).

Having said that, it should be relatively easy to store the (parsed, or at least easily parseable) 500 last commits of a branch into .git/info/commits-<branch>.

This would put the burden of publishing a branch higher, easening the overall load on the server.

Jakub?

Ciao, Dscho

Previous: H. Peter AnvinNext: H. Peter Anvin
Message 6 of 39 in “.git/info/refs”
  1. H. Peter AnvinJan 24, 2007
  2. Jakub NarebskiJan 24, 2007
  3. H. Peter AnvinJan 24, 2007
  4. Johannes SchindelinJan 24, 2007
  5. H. Peter AnvinJan 24, 2007
  6. Johannes SchindelinJan 24, 2007
  7. H. Peter AnvinJan 24, 2007
  8. Johannes SchindelinJan 24, 2007
  9. H. Peter AnvinJan 24, 2007
  10. Jakub NarebskiJan 24, 2007
  11. Jakub NarebskiJan 24, 2007
  12. Johannes SchindelinJan 24, 2007
  13. H. Peter AnvinJan 25, 2007
  14. Jakub NarebskiJan 26, 2007
  15. Junio C HamanoJan 26, 2007
  16. H. Peter AnvinJan 26, 2007
  17. Jakub NarebskiJan 26, 2007
  18. Johannes SchindelinJan 26, 2007
  19. H. Peter AnvinJan 26, 2007
  20. H. Peter AnvinJan 26, 2007
  21. Jakub NarebskiJan 24, 2007
  22. hpa@zytor.comJan 24, 2007
  23. Johannes SchindelinJan 25, 2007
  24. H. Peter AnvinJan 25, 2007
  25. Johannes SchindelinJan 25, 2007
  26. hpa@zytor.comJan 24, 2007
  27. Junio C HamanoJan 25, 2007
  28. H. Peter AnvinJan 25, 2007
  29. Junio C HamanoJan 25, 2007
  30. H. Peter AnvinJan 25, 2007
  31. Johannes SchindelinJan 25, 2007
  32. H. Peter AnvinJan 27, 2007
  33. Santi BéjarJan 31, 2007
  34. Johannes SchindelinFeb 1, 2007
  35. H. Peter AnvinFeb 1, 2007
  36. Johannes SchindelinFeb 1, 2007
  37. H. Peter AnvinFeb 1, 2007
  38. Matthias LederhoferFeb 1, 2007
  39. H. Peter AnvinFeb 1, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.