GNU bug report logs - #59151
Major performance issues in dired over ssh (Tramp) when remote directory contains symlinks

Previous Next

Package: emacs;

Reported by: Mikhail Pomaznoy <mikpom <at> mikpom.ru>

Date: Wed, 9 Nov 2022 17:18:02 UTC

Severity: normal

Tags: notabug

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: Mikhail Pomaznoy <mikpom <at> mikpom.ru>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 59151 <at> debbugs.gnu.org
Subject: bug#59151: Major performance issues in dired over ssh (Tramp) when remote directory contains symlinks
Date: Thu, 10 Nov 2022 16:30:30 +0700
> I recommend you to disable the buffer-local font-lock-mode in a remote
> dired buffer with so many symlinked files, via `M-x font-lock-mode'.
Indeed, disabling font-lock works like a charm and restores the performance

> This takes time for remote files, especially if you don't use Tramp
> caches, or caches with a short timeout.
What an average Emacs Tramp user can do about those caches? searching 
for keywords `tramp cache` in customize menu of emacs gives nothing. If 
I search for `cache` in Tramp manual there is just a single section 
which doesn't look relevant for this case. Is the caches you talking 
about something "sophisticated" or simply documentation is lacking?

Of course certain lag is fine and expected when the directory is listed 
for the first time. But on every scroll ?

Thanks for your reply,

-Mikhail

On 11/10/22 16:16, Michael Albinus wrote:
> Mikhail Pomaznoy <mikpom <at> mikpom.ru> writes:
>
>> Greetings emacs devs, or to whom it may concern!
> Hi Mikhail,
>
>> I am having troubles with dired listings of remote directories
>> containing many files and symlinks. When I scroll through such a dired
>> buffer Emacs lags (over a second) on every page-down scroll.
>>
>> The problem is easily reproducible with -Q if the directory contains a
>> hundred files and a hundred symbolic links to some other hundred files
>> somewhere on the filesystem. If I kill the links in the dired buffer
>> (without deleting any actual files or links) then everything scrolls
>> smoothly as usual.
>>
>> Could you please check if thats a real issue in your setting? ssh
>> connection I am using is not so slow...
> Dired does a lot of work for applying proper faces for the file
> status. For symlinked files, for example, it calls file-truename,
> file-exists-p, file-directory-p, for every single file in the
> listing. Some of them even several times.
>
> This takes time for remote files, especially if you don't use Tramp
> caches, or caches with a short timeout.
>
> I recommend you to disable the buffer-local font-lock-mode in a remote
> dired buffer with so many symlinked files, via `M-x font-lock-mode'.
>
>> Kind regards,
>>
>> -Mikhail
> Best regards, Michael.




This bug report was last modified 2 years and 249 days ago.

Previous Next


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