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 02:53:35 +0300 [thread overview]
Message-ID: <d0729f0f-30bd-274c-8473-28ebd8656d13@yandex.ru> (raw)
In-Reply-To: <87wnzonful.fsf@gmx.de>
Hi Michael,
On 18.10.2020 10:38, Michael Albinus wrote:
>> I don't have a strong opinion on the remote performance, but we might
>> want to ask Michael. Looking at the code, it seems to have forced him
>> to unfortunate measures in the past (such as adding said caching to
>> vc-git-root).
>
> I didn't follow the thread closely. Could you pls explain, what you find
> unfortunate in Tramp, and how to fix it?
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.
There are a couple problems with that:
- If FILE is a directory, this cache will never be invalidated (for
plain files, vc-file-clearprops is called from a number of functions,
including vc-refresh-state).
- We don't do this for any other backends, which leads to
inconsistencies in behavior, as well as surprising results, like when we
did that performance test earlier. I think this is the reason for it.
If we did this uniformly for all backends, we could perhaps find better
opportunities for caching and invalidation.
But before we look into that, could you try reproducing the original
problem?
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" ())
next prev parent reply other threads:[~2020-10-23 23:53 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 [this message]
2020-10-24 13:41 ` Michael Albinus
2020-10-24 19:42 ` Dmitry Gutov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d0729f0f-30bd-274c-8473-28ebd8656d13@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 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.