git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Lars Hjemli" <hjemli@gmail.com>
Cc: git@vger.kernel.org, "Petr Baudis" <pasky@suse.cz>,
	"John Hawley" <warthog19@eaglescrag.net>
Subject: Re: [RFC/PATCH] gitweb: Paginate project list
Date: Wed, 14 May 2008 01:28:39 +0200	[thread overview]
Message-ID: <200805140128.40853.jnareb@gmail.com> (raw)
In-Reply-To: <8c5c35580805131230p37953e33he97803c0609012fa@mail.gmail.com>

On Tue, 13 May 2008, Lars Hjemli wrote:
> 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).
[...]
>>  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

  reply	other threads:[~2008-05-13 23:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-01 10:20 [RFC/PATCH] gitweb: Simplify git_project_list_body Jakub Narebski
2008-05-02 10:30 ` [RFC/PATCH] gitweb: Allow project description in project_index file Jakub Narebski
2008-05-02 13:04   ` Miklos Vajna
2008-05-03  9:03     ` Jakub Narebski
2008-05-04  2:03       ` Miklos Vajna
2008-05-09 13:23       ` [RFC/PATCH] gitweb: Project search Jakub Narebski
2008-05-10  9:28         ` [RFC/PATCH] gitweb: Paginate project list Jakub Narebski
2008-05-10 18:28           ` J.H.
2008-05-10 22:32             ` Jakub Narebski
2008-05-11  5:53               ` J.H.
2008-05-11 23:51                 ` Jakub Narebski
     [not found]                 ` <8c5c35580805102356p7e5532aah319af921f9b19392@mail.gmail.com>
2008-05-12  7:03                   ` Jakub Narebski
2008-05-12 15:43                     ` Lars Hjemli
2008-05-13  6:55                       ` Jakub Narebski
     [not found]                         ` <8c5c35580805130939m1a1ef8e0yd72402f3c79190ea@mail.gmail.com>
2008-05-13 16:46                           ` Lars Hjemli
2008-05-13 17:04                           ` Jakub Narebski
2008-05-13 19:11                             ` Kristian Høgsberg
2008-05-13 19:30                             ` Lars Hjemli
2008-05-13 23:28                               ` Jakub Narebski [this message]
2008-05-14  7:59                                 ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200805140128.40853.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=hjemli@gmail.com \
    --cc=pasky@suse.cz \
    --cc=warthog19@eaglescrag.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).