unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: sbaugh@janestreet.com, 71094@debbugs.gnu.org, rgm@gnu.org
Subject: bug#71094: [PATCH] Prefer to run find and grep in parallel in rgrep
Date: Wed, 22 May 2024 16:50:57 +0300	[thread overview]
Message-ID: <868r026jlq.fsf@gnu.org> (raw)
In-Reply-To: <8aedd0ed-58fe-4ac7-98d6-950be2d4700b@gutov.dev> (message from Dmitry Gutov on Wed, 22 May 2024 15:34:06 +0300)

> Date: Wed, 22 May 2024 15:34:06 +0300
> Cc: 71094@debbugs.gnu.org, rgm@gnu.org
> From: Dmitry Gutov <dmitry@gutov.dev>
> 
> On 22/05/2024 14:59, Eli Zaretskii wrote:
> 
> > With how many files did you measure the 40% speedup?  Can you show the
> > performance with much fewer and much more files than what you used?
> 
> FWIW my test indicated that for a smaller project (such as Emacs) the 
> difference is fairly small - the new code is slightly better or the same.
> 
> The directory where I saw significant improvement has 300K files.

That's what I thought.  So we are changing the decade-old defaults to
favor huge directories, which is not necessarily the wisest thing to
do.

> > I
> > suspect that the effect depends on that.  (It also depends on the
> > system limit on the number of files and the length of the command line
> > that xargs can use.)  The argument about 'find' waiting is no longer
> > relevant with 'exec-plus', since in most cases there will be just one
> > invocation of 'grep'.
> 
> If there's just one invocation, wouldn't that mean that it will happen 
> at the end of the full directory scan? Rather than in parallel.

That's true, but what is your mental model of how the pipe with xargs
works in practice?  How many invocations of grep will xargs do, and
when will the first invocation happen?





  reply	other threads:[~2024-05-22 13:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-21 14:35 bug#71094: [PATCH] Prefer to run find and grep in parallel in rgrep Spencer Baugh
2024-05-21 20:00 ` Dmitry Gutov
2024-05-22 11:59 ` Eli Zaretskii
2024-05-22 12:34   ` Dmitry Gutov
2024-05-22 13:50     ` Eli Zaretskii [this message]
2024-05-22 14:22       ` Dmitry Gutov
2024-05-22 14:42         ` Eli Zaretskii
2024-05-22 14:50           ` Dmitry Gutov
2024-05-22 15:26             ` Eli Zaretskii
2024-05-22 17:47               ` Dmitry Gutov
2024-05-22 18:21                 ` Eli Zaretskii
2024-05-22 18:06               ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-22 18:30                 ` Eli Zaretskii
2024-05-22 19:15                   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-23  4:46                     ` Eli Zaretskii
2024-05-23 13:24                       ` Dmitry Gutov
2024-05-24 17:44                         ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-26 15:57                           ` Dmitry Gutov
2024-05-22 18:51                 ` Dmitry Gutov
2024-05-22 19:36                   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-22 19:59                     ` Dmitry Gutov
2024-05-22 12:54   ` Spencer Baugh
2024-05-26  9:47     ` Eli Zaretskii
2024-05-30 12:29       ` Spencer Baugh
2024-05-30 14:52         ` Eli Zaretskii
2024-06-28 14:03           ` Spencer Baugh

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: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=868r026jlq.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71094@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=rgm@gnu.org \
    --cc=sbaugh@janestreet.com \
    /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://git.savannah.gnu.org/cgit/emacs.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).