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

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.
Previous: Shawn O. Pearce
Message 3 of 3 in “gitweb: speed up project listing by limiting find depth”
  1. gitweb: speed up project listing by limiting find depthLuke Lu, Oct 17, 2007
  2. Shawn O. PearceOct 17, 2007
  3. Shawn O. PearceOct 17, 2007

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.