Re: [PATCH] gitweb: speed up project listing by limiting find depth
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Oct 17, 2007, 02:40 UTC
- Message-ID
- <20071017024018.GR13801@spearce.org>
- In-Reply-To
- <1192583606-14893-1-git-send-email-git@vicaya.com>
Luke Lu <git@vicaya.com> wrote:
Show 5 quoted lines
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 3064298..d62357f 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -1509,16 +1513,23 @@ sub git_get_projects_list {...
Show 7 quoted lines
> + # don't traverse too deep (Find is super slow on os x)
> + if (tr!/!! - $pfxdepth > $project_maxdepth) {
> + $File::Find::prune = 1;
> + return;
> + }
>
> my $subdir = substr($File::Find::name, $pfxlen + 1);Your patch appears to be causing some errors in the test suite in t/t9500-gitweb-standalone-no-errors.sh. Perl is whining about $subdir not getting initialized above due to the substr being off the string. I've got too many other topics tonight to figure out why yours is failing, can you please run the test and resubmit when you've resolved the error?
-- Shawn.