git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nagy Balázs" <js@iksz.hu>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Bruno Cesar Ribas <ribas@c3sl.ufpr.br>, git@vger.kernel.org
Subject: Re: [PATCH] Added sub get_owner_file which checks if there's a file with project owner name
Date: Wed, 30 Jan 2008 16:59:14 +0100	[thread overview]
Message-ID: <47A09ED2.6070407@iksz.hu> (raw)
In-Reply-To: <200801292236.19630.jnareb@gmail.com>

Jakub Narebski wrote:
> Nagy Balázs wrote:
>   
>> Are you talking about I/O of an all-in CGI script?  
>>     
>
> I am talking there between I/O difference between situation
> (configuration) when $projects_list is a directory (default),
> or is a file. If $projects_list is a directory, gitweb scans
> directory structure to find git repositories, which for large
> number of repositories might take time, even with filesystem
> cache, and with depth of searching bound by $project_maxdepth.
> Add to that finding symbolic name of the owner of repository
> directory, or (with the patch) reading a file per repo with repo
> owner.
>   
We have two configurable options here: $projectroot and $projects_list.  
If $projects_list is a directory, we'll end up using a directory to get 
project list info, and using another one to actually handle the 
projects.  In small repo area it's safe to have $projects_list empty.  
This is why I reference $projects_list as a file.

If $projects_list is a file, we'll rely on a file which was generated 
some time ago and can't reflect the latest changes of $projectroot (but 
see below).
>> We can tune the  
>> performance of this script, but changing the GIT_DIR structure just 
>> because of a simple script is a bit overkill to me.
>>
>> What if this script creates the $projects_list file, for example when 
>> the $projectroot's mtime changes?  We can even hold mtime info for every 
>> project's config file.
>>     
>
> I don't understand what you wanted to say here. $projects_list file
> lists only project path (project name) and project owner.
>   
I mean it would be better to add this kind of metadata like description 
and owner's shoesize to config instead of a raw file.  I understand row 
files are easier to read but reading a single cache file adn doing some 
stat()s are much easier.  I can think of $project_lists as a cache file 
name, which can be maintained by gitweb.cgi, and these mtime values 
could be saved to $project_list to verify entries' validity.

All we have to do is to maintain $project_list to be up to date.  The 
best would be to have a separate projectlist maintainer script which 
handles two scenarios:

1| repo addition/deletion
2| repo config changes

I don't have solution for the first scenario which would be a speed 
improvement in gitweb.cgi, this is why I suggest to put $project_list 
updater to a separate script.  The second scenario could be handled by 
gitweb.cgi though, but it would be mere code duplication.

Regards:
-- 
Balazs Nagy

  reply	other threads:[~2008-01-30 15:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29  3:36 [PATCH] Added sub get_owner_file which checks if there's a file with project owner name Bruno Ribas
2008-01-29 11:26 ` Jakub Narebski
2008-01-29 14:25   ` Bruno Cesar Ribas
2008-01-29 15:28     ` Jakub Narebski
2008-01-29 17:22       ` Bruno Cesar Ribas
2008-01-29 18:27         ` Jakub Narebski
2008-01-29 20:53       ` Nagy Balázs
2008-01-29 21:36         ` Jakub Narebski
2008-01-30 15:59           ` Nagy Balázs [this message]
2008-02-01 13:18             ` Jakub Narebski
2008-02-01 16:11               ` Nagy Balázs
2008-02-01 19:10                 ` Robin Rosenberg

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=47A09ED2.6070407@iksz.hu \
    --to=js@iksz.hu \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=ribas@c3sl.ufpr.br \
    /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).