From: Steve Long <slong@rathaus.eclipse.co.uk>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Re: Re: Re: [gentoo-commits] gentoo-x86 commit in app-misc/note: ChangeLog note-1.3.3.ebuild
Date: Tue, 16 Oct 2007 03:14:12 +0100 [thread overview]
Message-ID: <ff16ib$t43$1@ger.gmane.org> (raw)
In-Reply-To: 1192492093.31537.2.camel@su.perronet.esiee.net
Gilles Dartiguelongue wrote:
> I haven't reread the fine mans for a while but iirc, + could lead you to
> hit the argument buffer limit of your shell. xargs has --max-args to get
> around that and is also way faster than any -exec variant (at least
> that's what the bench I did on a PIV2.6Ghz showed me about 4 months ago)
>
It doesn't: find will just execute the command as many times as needed (each
time with an argument length maximally less than ARG_MAX. Well, it did when
we tested this a couple of months ago.) So it's optimal in that sense. I
have no idea on the timing measurements, but I don't like pipes and
subshells as a rule (externals are bad enough!;>) It'd be interesting to
see measurements over 100000 loops with long argument lists requiring
multiple invocations per pass, I suppose.
An array expansion can lead to an argument length greater than ARG_MAX
however, eg funcToFix "${list[@]}"
(I'd be kind of perturbed if the last case were infeasible since it would
imply poor memory handling in BASH, and limit the scope of its usability.)
--
gentoo-dev@gentoo.org mailing list
next prev parent reply other threads:[~2007-10-16 2:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1IhKZ7-000421-Hg@stork.gentoo.org>
2007-10-15 7:42 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-misc/note: ChangeLog note-1.3.3.ebuild Donnie Berkholz
2007-10-15 7:56 ` Bo Ørsted Andresen
2007-10-15 8:01 ` Donnie Berkholz
2007-10-15 8:40 ` Roy Marples
2007-10-15 8:07 ` Ulrich Mueller
2007-10-15 8:35 ` Roy Marples
2007-10-15 8:43 ` Fabian Groffen
2007-10-15 9:07 ` Roy Marples
2007-10-15 22:43 ` [gentoo-dev] " Steve Long
2007-10-15 23:48 ` Gilles Dartiguelongue
2007-10-16 2:14 ` Steve Long [this message]
2007-10-16 2:32 ` [gentoo-dev] " Elias Pipping
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='ff16ib$t43$1@ger.gmane.org' \
--to=slong@rathaus.eclipse.co.uk \
--cc=gentoo-dev@lists.gentoo.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox