GNU bug report logs -
#42966
28.0.50; vc-dir: wrong backend
Previous Next
Reported by: sds <at> gnu.org
Date: Fri, 21 Aug 2020 15:16:02 UTC
Severity: minor
Tags: fixed
Merged with 3807,
8179,
8603,
18514
Found in versions 23.3.50, 24.0.50, 24.3, 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #67 received at 42966 <at> debbugs.gnu.org (full text, mbox):
On 24.10.2020 16:41, Michael Albinus wrote:
> Dmitry Gutov <dgutov <at> 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.
This bug report was last modified 4 years and 203 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.