From: Dmitry Gutov <dgutov@yandex.ru>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, Sam Steingold <sds@gnu.org>,
42966@debbugs.gnu.org
Subject: bug#42966: 28.0.50; vc-dir: wrong backend
Date: Sat, 24 Oct 2020 22:42:57 +0300 [thread overview]
Message-ID: <057dedcd-8f2f-615e-f660-389b9013336a@yandex.ru> (raw)
In-Reply-To: <87y2jvwxkd.fsf@gmx.de>
On 24.10.2020 16:41, Michael Albinus wrote:
> Dmitry Gutov <dgutov@yandex.ru> writes:
>
>> Hi Michael,
>
> Hi Dmitry,
>
>> Not in Tramp, but I see an old change in VC that was most likely
>> informed by a performance problem in Tramp.
>>
>> See the commit a40c87a0093. It adds caching of the result of
>> vc-git-root to a VC property 'git-root' on the file name.
>
> This seems to be bug#11757.
Huh. Looks familiar ;-)
But that report was about process calls (and git.cmd being expensive),
whereas vc-git-root doesn't call any external programs, it just
traverses the filesystem.
>> Does the change below still make some scenario perceptibly slower?
>>
>> diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
>> index b1880c0f7b..91554bb6d8 100644
>> --- a/lisp/vc/vc-git.el
>> +++ b/lisp/vc/vc-git.el
>> @@ -1573,8 +1573,7 @@ vc-git-extra-menu
>> (defun vc-git-extra-status-menu () vc-git-extra-menu-map)
>>
>> (defun vc-git-root (file)
>> - (or (vc-file-getprop file 'git-root)
>> - (vc-file-setprop file 'git-root (vc-find-root file ".git"))))
>> + (vc-find-root file ".git"))
>>
>> ;; grep-compute-defaults autoloads grep.
>> (declare-function grep-read-regexp "grep" ())
>
> I haven't tested. But this means to call process-file several times,
> it would be a performance degradation, for sure.
Could you test it, please?
AFAICT locate-dominating-file doesn't call process-file.
next prev parent reply other threads:[~2020-10-24 19:42 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 15:15 bug#42966: 28.0.50; vc-dir: wrong backend Sam Steingold
2020-10-16 8:55 ` Lars Ingebrigtsen
2020-10-16 12:44 ` Dmitry Gutov
2020-10-16 14:41 ` Lars Ingebrigtsen
2020-10-16 14:44 ` Dmitry Gutov
2020-10-17 7:02 ` Lars Ingebrigtsen
2020-10-17 7:13 ` Lars Ingebrigtsen
2020-10-17 7:19 ` Lars Ingebrigtsen
2020-10-17 20:41 ` Dmitry Gutov
2020-10-18 8:26 ` Lars Ingebrigtsen
2020-10-17 20:44 ` Dmitry Gutov
2020-10-18 7:38 ` Michael Albinus
2020-10-23 23:53 ` Dmitry Gutov
2020-10-24 13:41 ` Michael Albinus
2020-10-24 19:42 ` Dmitry Gutov [this message]
2020-10-25 17:49 ` Michael Albinus
2020-10-26 14:29 ` Dmitry Gutov
2020-10-26 15:17 ` Michael Albinus
2020-10-26 20:12 ` bug#42966: (no subject) Lars Ingebrigtsen
2020-10-26 20:13 ` Lars Ingebrigtsen
2020-10-26 20:55 ` bug#42966: Dmitry Gutov
2020-10-26 21:02 ` bug#42966: Lars Ingebrigtsen
2020-10-26 21:44 ` bug#42966: Dmitry Gutov
2020-10-26 21:11 ` bug#42966: 28.0.50; vc-dir: wrong backend Dmitry Gutov
2020-10-18 8:32 ` Lars Ingebrigtsen
2020-10-16 15:35 ` Glenn Morris
2020-10-16 18:19 ` Dmitry Gutov
2020-10-17 6:06 ` Lars Ingebrigtsen
2020-10-17 20:01 ` Dmitry Gutov
2020-10-18 8:31 ` Lars Ingebrigtsen
2020-10-26 21:54 ` Glenn Morris
2020-10-26 21:58 ` Lars Ingebrigtsen
2020-10-26 22:14 ` Dmitry Gutov
2020-10-26 22:11 ` 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=057dedcd-8f2f-615e-f660-389b9013336a@yandex.ru \
--to=dgutov@yandex.ru \
--cc=42966@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=michael.albinus@gmx.de \
--cc=sds@gnu.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.
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).