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

Re: [RFC/PATCH] gitweb: Paginate project list

From
Jakub Narebski <jnareb@gmail.com>
Date
May 13, 2008, 23:28 UTC
Message-ID
<200805140128.40853.jnareb@gmail.com>
In-Reply-To
<8c5c35580805131230p37953e33he97803c0609012fa@mail.gmail.com>
On Tue, 13 May 2008, Lars Hjemli wrote:
Show 6 quoted lines
> On Tue, May 13, 2008 at 7:04 PM, Jakub Narebski <jnareb@gmail.com>
> wrote: 
>> On Tue, 13 May 2008, Lars Hjemli wrote:
>>>
>>> [...] (cgit never touches the repos to generate
>>> the project list/search).
[...]
Show 5 quoted lines
>>  Second, gitweb's projects list page contains "Last Changed" column,
>>  and you _*have*_ to hit repositories for this data
> 
> No you don't. One alternative is to use the post-update hook in each
> repo to update a separate file with info about last-changed-time.

Well, adding setting / caching last-changed data using post-update hook was one of my early patches to gitweb, but it got shot down. Mainly because the fact that it doesn't work with gitweb as "usergit" service, as you won't be able to install hooks into other users repositories, like in the kernel.org case (it should/would work for repo.or.cz etc.). Another issue is if you publish via web interface non-bare repo; then update is not the only way data arrives at repository (yes, I know that post-commit would solve this).

> Another (less accurate) alternative is to stat one or more of
> packed-refs and refs/heads/*; 
And now, in the times of detached HEAD, also HEAD.
BTW. how this work with hierarchical branch names?
>                               cgit uses both of these alternatives to 
> avoid hitting the repo (i.e. object-db) when the project list/search
> page is generated.

First is implicit caching of data, made easier because in this case you can invalidate cache when it becomes invalid. Second doesn't hit the object-db, but it hits I/O (perhaps very slightly); and the second solution is what we can pursue for gitweb in addition to caching data.

Additional complication is that currently there is no place for timestamp in project_index format (backward compatibility, unnamed tuple not good design to storing structured/tabular data).

-- 
Jakub Narebski
Poland
Previous: Lars HjemliNext: Jakub Narebski
Message 19 of 20 in “gitweb: Simplify git_project_list_body”
  1. gitweb: Simplify git_project_list_bodyJakub Narebski, May 1, 2008
  2. gitweb: Allow project description in project_index fileJakub Narebski, May 2, 2008
  3. Miklos VajnaMay 2, 2008
  4. gitweb: Allow project description in project_index fileJakub Narebski, May 3, 2008
  5. Miklos VajnaMay 4, 2008
  6. gitweb: Project searchJakub Narebski, May 9, 2008
  7. gitweb: Paginate project listJakub Narebski, May 10, 2008
  8. J.H.May 10, 2008
  9. Jakub NarebskiMay 10, 2008
  10. J.H.May 11, 2008
  11. Jakub NarebskiMay 11, 2008
  12. Jakub NarebskiMay 12, 2008
  13. Lars HjemliMay 12, 2008
  14. Jakub NarebskiMay 13, 2008
  15. Lars HjemliMay 13, 2008
  16. Jakub NarebskiMay 13, 2008
  17. Kristian HøgsbergMay 13, 2008
  18. Lars HjemliMay 13, 2008
  19. Jakub NarebskiMay 13, 2008
  20. Jakub NarebskiMay 14, 2008

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.