GNU bug report logs - #73718
31.0.50; Severe performance issue with Tramp and project-mode-line-format

Previous Next

Package: emacs;

Reported by: Ergus <spacibba <at> aol.com>

Date: Wed, 9 Oct 2024 10:44:01 UTC

Severity: normal

Found in version 31.0.50

Fixed in version 31.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 73718 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Ergus <spacibba <at> aol.com>, Michael Albinus <michael.albinus <at> gmx.de>,
 73718 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#73718: 31.0.50;
 Severe performance issue with Tramp and project-mode-line-format
Date: Wed, 9 Oct 2024 10:01:14 -0400
[Message part 1 (text/plain, inline)]
To be clearer, I've guarded project-try-vc with advice. Perhaps a user
option to enable the guard intrinsically would be better as everyone could
benefit. I have my own option variables doing this so I can enable it when
wanted.

Perhaps Ergus can give something similar a try and see if this solves his
immediate hanging concern.

Ergus, you should be able to just drop the below snippet in your init file
(or eval in *scratch*) and see if it works for you.

  (defun my/project-try-vc-advice (orig-fun dir)
    (or (vc-file-getprop dir 'project-vc)
        (if (file-remote-p dir)
            nil
          (funcall orig-fun dir))))
  (advice-add 'project-try-vc :around #'my/project-try-vc-advice))


On Wed, Oct 9, 2024 at 9:45 AM Ship Mints <shipmints <at> gmail.com> wrote:

> I've added file-remote-p guards in a variety of places specifically to
> avoid these issues.
>
> On Wed, Oct 9, 2024 at 9:39 AM Dmitry Gutov <dgutov <at> yandex.ru> wrote:
>
>> Hi!
>>
>> On 09/10/2024 13:43, Ergus via Bug reports for GNU Emacs, the Swiss army
>> knife of text editors wrote:
>> > I made a profile and it looks like there is some bad interaction between
>> > project-mode-line and tramp names
>> >
>> > I already tried:
>> >
>> > (connection-local-set-profile-variables 'my-profile
>> '((project-mode-line . nil)))
>> > (connection-local-set-profiles '(:application tramp :user "myuser")
>> 'my-profile)
>> >
>> > But is not disabling the modeline for remote files.
>>
>> I wonder if we'll need to disable project-mode-line in remote files
>> altogether, or if this is a problem that could be solved in Tramp (with
>> extra caching?)
>>
>> To use connect-local value to disable, BTW, it would need to have extra
>> code called from the mode line format (in bindings.el). And it's a part
>> that was added only recently, for in Emacs 30.
>>
>>
>>
>>
[Message part 2 (text/html, inline)]

This bug report was last modified 216 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.