From: merlyn@stonehenge•com (Randal L. Schwartz)
To: Jakub Narebski <jnareb@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] gitweb: Use File::Find::find in git_get_projects_list
Date: 14 Sep 2006 10:12:29 -0700 [thread overview]
Message-ID: <86mz921if6.fsf@blue.stonehenge.com> (raw)
In-Reply-To: <eec1tp$9c9$1@sea.gmane.org>
>>>>> "Jakub" == Jakub Narebski <jnareb@gmail•com> writes:
Jakub> First benchmarks showed that no_chdir was some faster. I have rechecked,
Jakub> and they are the same within the margin of error, perhaps without
Jakub> no_chdir is slightly faster. 447 +/- 11 ms vs. 450 +/- 10 ms according
Jakub> to ApacheBench (ab -n 10).
Any benchmarks will certainly depend on the O/S as well. The advantage to
chdir is that the name-to-inode lookups don't need to keep retraversing the
upper directories. And keep in mind that caching will affect the benchmarks
on that.
As for that whole -d thing...
If you use _, you have to keep in mind whether the previous call was a stat()
or an lstat(). Both lstat() (explictly) and -l use lstat(). Everything else
is a stat(). So, "-l and not -d" uses an lstat to determine that we're
looking at a symlink, but a stat to determine that the item pointed at is not
a directory. NEVER use readlink(), as it very likely will require a lot of
flattening for you to simulate what the OS does. (See my article on that at
<http://www.stonehenge.com/merlyn/UnixReview/col27.html>.)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge•com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
next prev parent reply other threads:[~2006-09-14 17:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-14 6:39 [PATCH] gitweb: Use File::Find::find in git_get_projects_list Jakub Narebski
2006-09-14 7:37 ` Junio C Hamano
2006-09-14 7:59 ` Jakub Narebski
2006-09-14 9:23 ` Junio C Hamano
2006-09-14 18:32 ` Junio C Hamano
2006-09-14 18:43 ` Jakub Narebski
2006-09-14 9:40 ` Junio C Hamano
2006-09-14 10:01 ` Jakub Narebski
2006-09-14 16:42 ` Junio C Hamano
2006-09-14 17:02 ` Jakub Narebski
2006-09-14 17:12 ` Randal L. Schwartz [this message]
2006-09-14 17:39 ` [PATCH (amend)] " Jakub Narebski
2006-09-14 19:14 ` Jakub Narebski
2006-09-14 19:51 ` Junio C Hamano
2006-09-14 21:50 ` Randal L. Schwartz
2006-09-14 19:34 ` [PATCH (take 3)] " Jakub Narebski
2006-09-14 20:13 ` Junio C Hamano
2006-09-14 20:18 ` [PATCH (take 4)] " Jakub Narebski
2006-09-14 20:24 ` Jakub Narebski
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=86mz921if6.fsf@blue.stonehenge.com \
--to=merlyn@stonehenge$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=jnareb@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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