GNU bug report logs - #73046
29.4; Emacs 100% CPU usage for several seconds when opening dired buffer over TRAMP

Previous Next

Package: emacs;

Reported by: "Suhail Singh" <suhailsingh247 <at> gmail.com>

Date: Thu, 5 Sep 2024 14:56:01 UTC

Severity: normal

Found in version 29.4

Fixed in version 31.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Suhail Singh <suhailsingh247 <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Suhail Singh <suhailsingh247 <at> gmail.com>, 73046 <at> debbugs.gnu.org
Subject: bug#73046: 29.4; Emacs 100% CPU usage for several seconds when opening dired buffer over TRAMP
Date: Sat, 07 Sep 2024 13:58:10 -0400
Michael Albinus <michael.albinus <at> gmx.de> writes:

>>>>> I believe it would be helpful to suppress these checks via a user
>>>>> option. And no, the checks shouldn't be suppressed for remote
>>>>> directories in general, on a fast connection they are valuable.
>
> I gave it a try, see appended patch.

Thank you for sharing the patch.  I haven't tested the patch yet, so my
comments below are based on reviewing the code and my experience with
the workaround I currently have.

> There's a new user option `dired-highlight-symlinks'. If non-nil (the
> default), symlinks are highlighted the same way as now. With a nil
> value, they aren't.

I propose that the non-default behaviour be that `dired-symlink-face' is
applied to the entirety of the symlink.  If you agree, it might be
better to additionally rename `dired-highlight-symlinks' accordingly to
reflect the updated behaviour.

> You can switch this option on and off globally. However, it would be
> better to do this host-wise. For this, we have connection-local
> variables. The following code snippet in your ".emacs" switches the
> option off for the remote host "remotehost".
>
> (connection-local-set-profile-variables
>  'my-dired-profile
>  '((dired-highlight-symlinks . nil)))
>
> (connection-local-set-profiles
>  '(:application tramp :machine "remotehost")
>  'my-dired-profile)
>
> Comments?

TIL about connection-local variables.  Yes, this would be helpful.
However, if so desired, I imagine that setting
`dired-highlight-symlinks' buffer-locally in the `dired-mode-hook' would
work as well.  Is my understanding correct?

-- 
Suhail




This bug report was last modified 298 days ago.

Previous Next


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