From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mikhail Pomaznoy Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <907b450b-c502-a09c-0f81-0ff57e3a3bfa@mikpom.ru> <87k043xj7j.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39956"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Cc: 59151@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 10 10:32:16 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ot3ux-000AAn-Fg for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Nov 2022 10:32:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ot3ul-0004SS-Bd; Thu, 10 Nov 2022 04:32:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot3tn-0004He-44 for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 04:31:17 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ot3tm-0000pX-72 for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 04:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ot3tl-0004Be-TV for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2022 04:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mikhail Pomaznoy Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Nov 2022 09:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59151 X-GNU-PR-Package: emacs Original-Received: via spool by 59151-submit@debbugs.gnu.org id=B59151.166807264716074 (code B ref 59151); Thu, 10 Nov 2022 09:31:01 +0000 Original-Received: (at 59151) by debbugs.gnu.org; 10 Nov 2022 09:30:47 +0000 Original-Received: from localhost ([127.0.0.1]:41893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot3tX-0004BC-EJ for submit@debbugs.gnu.org; Thu, 10 Nov 2022 04:30:47 -0500 Original-Received: from mikpom.ru ([212.193.52.17]:47940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot3tU-0004B0-Ll for 59151@debbugs.gnu.org; Thu, 10 Nov 2022 04:30:45 -0500 Original-Received: from [192.168.0.100] (nat-88-4.nsk.sibset.net [5.44.169.94]) by mikpom.ru (Postfix) with ESMTPSA id F3287680; Thu, 10 Nov 2022 16:30:40 +0700 (+07) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mikpom.ru; s=dkim; t=1668072641; bh=u8ok901HPCaLQsefsra0fOAnC8Eci4UKHF5WW3Fb4Kw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=VqPCjbATJASRuYPmzMeOVdq1WrSTQvs4JMEBx8qXz+HhvlXQfqTKw/OJhw8XgCAl/ YIWB7TyqBlvua4gqhEVGaRuB0mCeZoNPotmu/x+PxPliv5ZP9b+8/dJr8VEe/NjZnP THc2cQZXcOEXVuC1xghYMrnMcqxeRxYBij5Z99sxtOycFPYGxI3VjYiQkJL80P2x03 NXtBnEYvKjfdm1I2vepQKePgJ5UfMXje4mN9Ne2oa8axCNX6Apec3wW0WKz72A+1e4 6gG+0GaCs/ZJ7mNDmcIGyHKJXA19AO/F3xhhLJBxF8WDpw991QQ9TXU9xB7aQE5V4v YAQzLO29TY2nQ== Content-Language: en-US In-Reply-To: <87k043xj7j.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247496 Archived-At: > 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 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.