unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: "Felicián Németh" <felician.nemeth@gmail.com>
Cc: Michael Albinus <michael.albinus@gmx.de>, 34343@debbugs.gnu.org
Subject: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files
Date: Thu, 26 Dec 2019 16:04:01 +0200	[thread overview]
Message-ID: <e498064e-9518-3429-038c-78651f8221be@yandex.ru> (raw)
In-Reply-To: <CAGLaV2YGDyJAo4xLbZn689-HG69kAcmLRQdaWz_RMq-fMkUGFg@mail.gmail.com>

On 08.03.2019 10:28, Felicián Németh wrote:
> Hi Dmitry,
> 
> I forgot that project-files are new in emacs-27, so there's no need to
> worry about backward compatibility.  Also, there is no need to hurry
> either, because emacs-27 won't be released soon.

Emacs 27 is approaching now. :-)

>> So I wonder if somebody has an opinion on that. Maybe we'll want to
>> include remote files as "external roots" in some projects? Or files
>> inside archives?
> 
> I never worked on a project with multiple remote-ids.  However, if we
> can come up with something simple that does not have significant
> performance impact on the local case, we should solve the general case,
> I think.  Remote operations tend to be slow, so I think project.el can
> run more complex algorithms in that case.

I've done some benchmarking. If the project is big (e.g. gecko-dev with 
200000+ files), and it resides locally, and the hdd is fast, and we can 
fetch the list of files quickly (i.e. it uses Git),

   (seq-group-by #'file-remote-p all-files)

is pretty slow.

For instance, in that example on my machine,

   (project-files (project-current))

takes 1.6s.

And

   (seq-group-by #'file-remote-p all-files)

itself takes 1s, and

   (mapcar #'file-local-name files))

takes another 0.9s. While Xargs+Grep only take another 3-4 seconds. So 
overall the remoteness processing takes a significant portion of the 
time in the local case even if we do it the smart way (e.g. avoid 
mapping through #'file-local-name if remote-id is nil).

So I've pushed a more simplistic patch to emacs-27 (commit be38e39fcc).

Felicián and Michael, please take a look.





  reply	other threads:[~2019-12-26 14:04 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06  8:18 bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files Felicián Németh
2019-02-14  1:17 ` Dmitry Gutov
2019-02-15 18:53   ` Felicián Németh
     [not found]     ` <a54e7498-4ead-dd6f-6a2e-3919ab035b23@yandex.ru>
2019-02-27  9:15       ` Michael Albinus
2019-03-06  7:47         ` Felicián Németh
2019-03-06 14:33           ` Dmitry Gutov
2019-03-06 14:44             ` Dmitry Gutov
2019-03-08  8:28               ` Felicián Németh
2019-12-26 14:04                 ` Dmitry Gutov [this message]
2019-12-27  8:24                   ` Michael Albinus
2019-12-27 14:18                     ` Dmitry Gutov
2019-12-27 17:57                       ` Michael Albinus
2019-12-28 10:21                         ` Michael Albinus
2019-12-28 14:48                           ` Dmitry Gutov
2019-12-28 18:56                             ` Michael Albinus
2019-12-28 14:46                         ` Dmitry Gutov
2019-12-28 18:46                           ` Michael Albinus
2019-12-29  0:15                             ` Dmitry Gutov
2019-12-29 12:34                               ` Michael Albinus
2019-12-29 13:14                                 ` Dmitry Gutov
2020-01-01 12:29                                   ` Michael Albinus
2020-01-02  1:22                                     ` Dmitry Gutov
2020-01-02 10:48                                       ` Michael Albinus
2020-01-03  0:52                                         ` Dmitry Gutov
2020-01-03  9:28                                           ` Michael Albinus
2020-01-06 14:33                                             ` Dmitry Gutov
2020-01-06 18:48                                               ` Michael Albinus
2020-01-07  3:23                                                 ` Dmitry Gutov
2020-01-07  9:19                                                   ` Michael Albinus
2020-01-07 13:40                                                     ` Dmitry Gutov
2020-01-07 14:29                                                       ` Michael Albinus
2020-01-07 14:34                                                         ` Dmitry Gutov
2021-07-22 13:00                                                           ` Lars Ingebrigtsen
2021-07-24 19:42                                                             ` Dmitry Gutov
2021-07-25  6:41                                                               ` Lars Ingebrigtsen
2020-01-03  0:57                                         ` Dmitry Gutov
2020-01-06 17:29                     ` Felician Nemeth
2020-01-07  3:23                       ` Dmitry Gutov

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=e498064e-9518-3429-038c-78651f8221be@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=34343@debbugs.gnu.org \
    --cc=felician.nemeth@gmail.com \
    --cc=michael.albinus@gmx.de \
    /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).