From: Spencer Baugh <sbaugh@janestreet.com>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 69233@debbugs.gnu.org, 69188@debbugs.gnu.org
Subject: bug#69188: bug#69233: 30.0.50; project-files + project-find-file is slow in large repositories
Date: Mon, 29 Apr 2024 16:27:01 -0400 [thread overview]
Message-ID: <ierjzkfoqy2.fsf_-_@janestreet.com> (raw)
In-Reply-To: <4e8e8f14-26be-4a50-b47b-a0373ce19b9a@gutov.dev> (Dmitry Gutov's message of "Wed, 17 Apr 2024 02:48:44 +0300")
Dmitry Gutov <dmitry@gutov.dev> writes:
> On 13/04/2024 05:34, Dmitry Gutov wrote:
>> Both options are relatively clunky, and the second one might also
>> fail to work when DIRS is non-nil (or would have to fall back to
>> absolute names anyway), so I'm leaning toward the first one. It
>> might also allow certain code to be written supporting both relative
>> and absolute names (e.g. a process call both binds default-directory
>> to root and keeps the file names as-is -- the relative ones would be
>> interpreted as such, the rest just as they are interpreted now).
>
> Here's how that change can look.
>
> The patch should demonstrate both the performance improvements for
> project-find-file and project-find-regexp, and some awkwardness in the
> implementation, chiefly due to backward compatibility.
>
> Guess more tests will be required, at the very least.
I see almost a 50% performance improvement with this patch in my large
private repository, once adding support for project-files-relative-names
in my internal project backend. Seems great so far.
My benchmarking:
(let ((proj (project-current)))
(list (benchmark-run 10 (let ((project-files-relative-names t)) (length (project-files proj))))
(benchmark-run 10 (let ((project-files-relative-names nil)) (length (project-files proj))))))
((17.605295389 28 7.647366087000023)
(29.918302167 57 19.246283027999993))
next prev parent reply other threads:[~2024-04-29 20:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 22:55 bug#69188: 30.0.50; project-files + project-find-file is slow in large repositories Spencer Baugh
2024-02-18 18:56 ` bug#69233: " Eli Zaretskii
2024-02-18 19:42 ` Dmitry Gutov
2024-02-18 19:45 ` Eli Zaretskii
2024-02-18 20:11 ` Dmitry Gutov
2024-02-18 20:18 ` Eli Zaretskii
2024-02-23 21:34 ` bug#69233: bug#69188: " Spencer Baugh
2024-04-13 2:34 ` Dmitry Gutov
2024-04-16 23:48 ` Dmitry Gutov
2024-04-29 20:27 ` Spencer Baugh [this message]
2024-05-05 0:29 ` bug#69188: bug#69233: " Dmitry Gutov
2024-04-29 21:04 ` Spencer Baugh
2024-05-05 3:32 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ierjzkfoqy2.fsf_-_@janestreet.com \
--to=sbaugh@janestreet.com \
--cc=69188@debbugs.gnu.org \
--cc=69233@debbugs.gnu.org \
--cc=dmitry@gutov.dev \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.