Re: [PATCH] Added sub get_owner_file which checks if there's a file with project owner name
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Jan 29, 2008, 21:36 UTC
- Message-ID
- <200801292236.19630.jnareb@gmail.com>
- In-Reply-To
- <479F925A.5020401@iksz.hu>
Nagy Balázs wrote:
> Jakub Narebski wrote:
Show 8 quoted lines
>> But I think if IO matters it is better to generate projects list; you >> can even use gitweb for that, or you can simply add a line with URL >> escaped project name (project path) relative to $projectroot, separated >> by space from the URL escaped (URI-encoded) project owner. See also >> "Gitweb repositories" section in gitweb/INSTALL. Adding projects is >> rare event. >> > 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.
Reading and pasing single text file avoids this; it is faster. But for small repos it is easier to scan directory, and difference in performance is not much.
Show 7 quoted lines
> 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.
-- Jakub Narebski Poland