|
From: | Dmitry Gutov |
Subject: | Re: Missing snprintf in ucrt mingw + vc-refresh in find-file hook? |
Date: | Mon, 12 Feb 2024 16:58:52 +0200 |
User-agent: | Mozilla Thunderbird |
On 12/02/2024 15:56, Arthur Miller wrote:
Dmitry Gutov<dmitry@gutov.dev> writes:On 12/02/2024 12:06, Arthur Miller wrote:Also, calling vc-refresh obviously results in a quite expensive call to git process everytime I open a file from git repo. Is it really a good default option? At least I interpret it so since emacs -q has vc-refresh in find-file-hook. Why do we even need vc-refresh by default in find-file-hook?To have the mode-line indicator up-to-date, I imagine.(setq vc-handled-backends nil) solved it. I would prefer such an expensive feature to be opt-in not opt-out, or at least better advertised so I don't have to find by a chance what Emacs is doing in the background; thanks.
The fact of the matter is, it's relatively expensive only on certain platforms, but much less so on the main one that we keep in mind when developing Emacs (GNU/Linux).
You might be curious to hear that visiting a file controlled by Git under MS Windows was ever slower in the past, and yours truly spent some effort reducing the number of process calls we take to compute a file's status (about 10 years ago or so).
I imagine.I would appreciate if you leave sarcasm out of your answers.
No sarcasm here. Your question is valid: why not defer the process calls until some operation actually requests the file's status.
The answer stems from the UI considerations. And if we show it in the mode-line, we have to update the file's VCS status eagerly.
[Prev in Thread] | Current Thread | [Next in Thread] |