From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Suhail Singh Newsgroups: gmane.emacs.bugs 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 Message-ID: <87plpf2vnx.fsf@gmail.com> References: <87o75241qh.fsf@gmail.com> <86plpi2ixa.fsf@gnu.org> <87seudke20.fsf@gmail.com> <8634md2vc2.fsf@gnu.org> <87h6asrk42.fsf@gmx.de> <86a5gk28ht.fsf@gnu.org> <87le0450x8.fsf@gmx.de> <865xr8228d.fsf@gnu.org> <87jzfofzcl.fsf@gmail.com> <8634mc1ty0.fsf@gnu.org> <87h6asl3hl.fsf@gmail.com> <87frqbk0fx.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31971"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , Suhail Singh , 73046@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 07 20:00:18 2024 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 1smzjO-0008Bt-RS for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Sep 2024 20:00:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smzjB-0001Mh-AM; Sat, 07 Sep 2024 14:00:05 -0400 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 1smzj9-0001La-2f for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 14:00:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1smzj8-0001WT-P2 for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 14:00:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=ToxAwKjiE+Qk/tmxjFbr6NheJOWqOdmkCmxFMqSIuwo=; b=sOL6G3JYdhWGOFGLD/xeVNMCxmrlklIE+ha/Tlzd0B1RMifagvZjI4MRtGun8+hCQvcXzhjjCZqpqBrcX/9g910CFV5j68loJGiWDphxQgB5rxnLmEz8uPRB947TsgIEOIpyMEG4sAHaAojipXM6Wp2KxlpY5178cX4oXn9vLSNNeHwAh/dC909nxr7CX45nEqz9a91icO6DWHlabLqA66Z5QbAbJ1clE/Qeu8T95oiB1iYWTO9sVsqaI0FfRNrgC1BorYAhYAaZ1PeECbJaHr9mImBlnCZaBWOJXojHhN3ZcI53M+Ig+/BiAGYah1yaHtrNtM/M5pGveXCPUzMH4A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1smzj9-0002xn-Af for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 14:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Suhail Singh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Sep 2024 18:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73046 X-GNU-PR-Package: emacs Original-Received: via spool by 73046-submit@debbugs.gnu.org id=B73046.172573197411311 (code B ref 73046); Sat, 07 Sep 2024 18:00:03 +0000 Original-Received: (at 73046) by debbugs.gnu.org; 7 Sep 2024 17:59:34 +0000 Original-Received: from localhost ([127.0.0.1]:57583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smzif-0002wK-Fp for submit@debbugs.gnu.org; Sat, 07 Sep 2024 13:59:34 -0400 Original-Received: from mail-qk1-f194.google.com ([209.85.222.194]:59768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smzib-0002vy-2T for 73046@debbugs.gnu.org; Sat, 07 Sep 2024 13:59:31 -0400 Original-Received: by mail-qk1-f194.google.com with SMTP id af79cd13be357-7a99de9beb2so87958485a.3 for <73046@debbugs.gnu.org>; Sat, 07 Sep 2024 10:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725731901; x=1726336701; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ToxAwKjiE+Qk/tmxjFbr6NheJOWqOdmkCmxFMqSIuwo=; b=Rit2h+yKX9iMt7oDxlysZRpW9cjNUoDyaDCCBtY/n0oE9PNWoNZUBEgZDmmvf0FnGo 6CENdy/TAQ8Vz0CrxjSC/FufkFip6YEFK7D8/fduROYHEEMq2spW4T3i2TxDZloP5+lS bmxhwxRHeWmweLznl1cK6/xCpHrw+6WSSUTYm/s+Iuy3sQX9PduwVgrHvBwxUsPgLoPn cvkhm2h1gNTaw7C6G4hOtk6UH8RRbbqYIA/9cXLqXAIkceGdFI/+V9GwkEqedCwgflvu eldtVBHatPAJuqupzEIpi0n/aMzeOerbmFlZIgvY79RAUR79jC7Dx0SnochoP+No43fg m4mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725731901; x=1726336701; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ToxAwKjiE+Qk/tmxjFbr6NheJOWqOdmkCmxFMqSIuwo=; b=SiCWgbifrQnthD6R4xupFifEN00R/F8FWhQBr7gdVQx7CAHEZxu4XQLIT0Sb0dsxVH DlwuRpeJhrrLt3zcWiV4787xrlA/gEG6Y+vpPd7tlebaKFBo6hL6IIkuuvUS9+3p2Fh9 4qYJQRp6YfYmJQrpjW59MJYbe+ig6Mua5N+coXy4Ey1jKeZj48u90u72I5E7SyEDue2I f76XKCgMDOw45nmgWr4RIZ1wFu7Z/oM9/dtf/zZqyzFA7XucsZoXNAJgWE4unhiu4j5o CSYMJcbV3r0ffT6Y3a69GgXots3ON60OeDR2y75+jv6fmigGDBXyZz2AbiuS0VWpze9k yW/Q== X-Forwarded-Encrypted: i=1; AJvYcCVulXFvttB2pQHJTaQl8nIVYoK5H3uWitrckT1OxUnwvZGjZCfcgLUdCqB2uG0Tq3ttbJbxtQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwjGg8X4b1pLppzSDyTUnkMUKTRmJjPsOeAcyJGdbAXQ7WYylM0 QUypOKHTJtn5j67MU21wcPAzG9JEcHXXroSJ2swqdu8WpuUWiDmapSDDOQx7 X-Google-Smtp-Source: AGHT+IGn47epg6o7oDseTUTHdaVspjn0gU+wstTONtJqV9rPYCbCaElkrRd0MDmdWEOd7zmVKsLulg== X-Received: by 2002:a05:6214:3c9d:b0:6bf:7c44:f7b4 with SMTP id 6a1803df08f44-6c5284ffbdamr61742596d6.31.1725731901465; Sat, 07 Sep 2024 10:58:21 -0700 (PDT) Original-Received: from gnus ([65.94.70.53]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6c534786129sm6121756d6.135.2024.09.07.10.58.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Sep 2024 10:58:20 -0700 (PDT) In-Reply-To: <87frqbk0fx.fsf@gmx.de> (Michael Albinus's message of "Sat, 07 Sep 2024 16:22:58 +0200") 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:291406 Archived-At: Michael Albinus 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