[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34343: [PATCH] Make project--find-regexp-in-files work with remote f
From: |
Dmitry Gutov |
Subject: |
bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files |
Date: |
Thu, 26 Dec 2019 16:04:01 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
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.
- bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files,
Dmitry Gutov <=
- bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files, Michael Albinus, 2019/12/27
- bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files, Dmitry Gutov, 2019/12/28
- bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files, Michael Albinus, 2019/12/28
- bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files, Dmitry Gutov, 2019/12/28
- bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files, Michael Albinus, 2019/12/29