From: "Shawn O. Pearce" <spearce@spearce.org>
To: Luke Lu <git@vicaya.com>
Cc: git@vger.kernel.org, gitster@pobox.com, Petr Baudis <pasky@suse.cz>
Subject: Re: [PATCH] gitweb: speed up project listing by limiting find depth
Date: Tue, 16 Oct 2007 20:41:25 -0400 [thread overview]
Message-ID: <20071017004125.GI13801@spearce.org> (raw)
In-Reply-To: <1192580691-14308-1-git-send-email-git@vicaya.com>
Luke Lu <git@vicaya.com> wrote:
> diff --git a/Makefile b/Makefile
> index 8db4dbe..b70ba8c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -165,6 +165,7 @@ GITWEB_CONFIG = gitweb_config.perl
> GITWEB_HOME_LINK_STR = projects
> GITWEB_SITENAME =
> GITWEB_PROJECTROOT = /pub/git
> +GITWEB_PROJECT_MAXDEPTH = 2
I'd rather see this default to an unlimited (or maybe insane?) depth.
Current users may be surprised upon upgrading to a more recent git
when their gitweb stops showing projects because the default depth
is too small.
repo.or.cz is up at 3 deep, maybe 4 right now, right Pasky?
I think letting admins control the depth is a good idea, but its
a performance tuning thing and probably shouldn't break existing
setups.
> + # don't traverse too deep (Find is super slow on os x)
> + return if tr!/!! - $pfxdepth > $project_maxdepth && ($File::Find::prune = 1);
I don't do much gitweb hacking, but I usually don't like to find
code that mutates a value as an important side-effect in the middle
of a boolean condition that is used to determine if we are breaking
out of this function now, or falling through to do more work. yea
its more lines of code but I think it would be easier to grok if this
was a proper if {...}.
--
Shawn.
next prev parent reply other threads:[~2007-10-17 0:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-17 0:24 [PATCH] gitweb: speed up project listing by limiting find depth Luke Lu
2007-10-17 0:41 ` Shawn O. Pearce [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-10-17 1:03 Luke Lu
2007-10-17 1:13 Luke Lu
2007-10-17 1:35 ` Shawn O. Pearce
2007-10-17 2:40 ` Shawn O. Pearce
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071017004125.GI13801@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=git@vicaya.com \
--cc=gitster@pobox.com \
--cc=pasky@suse.cz \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).