From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eyal Soha Newsgroups: gmane.emacs.bugs Subject: bug#74026: Patch to correct the list of cached functions in tramp-sh.el Date: Sat, 26 Oct 2024 07:18:20 -0600 Message-ID: References: <87ttcz9hpf.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006f28a70625611219" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17443"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74026-done@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 26 15:20:58 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 1t4giv-0004If-Q6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Oct 2024 15:20:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t4giV-000865-AJ; Sat, 26 Oct 2024 09:20:31 -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 1t4giT-00085m-Nl for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2024 09:20:29 -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 1t4giT-0003ir-Bv for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2024 09:20:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=r64uDCf/u+FSf366tdEcgHRKSvIf5Hs6IR+GATg4+QE=; b=sOi000Q3G95EVbHDKuOcaaD8Xnd0mDVK0la1Ofyc62HLbIlBFa3Me7YS7FDBEmbEVqDCPJrODTic5AU+8Cw+0utH7YVwV08vKfbDbBqdm8FhOFtF+6qHe5nWp51iLkcGD96rhs8y6F7tcLZKmYIw4AL/yXNeLADQUxhwIn6DzqF6He2/CE9YPezfRNM088cLexnV3AyXnwWakHLXfM450PRbaNnW8QmZCcgERFHJvWBDmQ69zWkm4qmRHuWCfzVBB/zzEBM5ZDwYy+Q4hKdchCGNoF6ZSsqzq72FnwBsQVPwK9eIkAe8sbd3+8JBZkTcej+5oZ6ZQI5ypw7UQ9xkiQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t4gj0-0005Xg-Dy for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2024 09:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eyal Soha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Oct 2024 13:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74026 X-GNU-PR-Package: emacs Original-Received: via spool by 74026-done@debbugs.gnu.org id=D74026.172994881320853 (code D ref 74026); Sat, 26 Oct 2024 13:21:02 +0000 Original-Received: (at 74026-done) by debbugs.gnu.org; 26 Oct 2024 13:20:13 +0000 Original-Received: from localhost ([127.0.0.1]:40886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4giD-0005QG-36 for submit@debbugs.gnu.org; Sat, 26 Oct 2024 09:20:13 -0400 Original-Received: from mail-vk1-f171.google.com ([209.85.221.171]:50635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t4giB-0005Q0-Fq for 74026-done@debbugs.gnu.org; Sat, 26 Oct 2024 09:20:12 -0400 Original-Received: by mail-vk1-f171.google.com with SMTP id 71dfb90a1353d-50d399891d6so742595e0c.1 for <74026-done@debbugs.gnu.org>; Sat, 26 Oct 2024 06:19:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729948712; x=1730553512; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=r64uDCf/u+FSf366tdEcgHRKSvIf5Hs6IR+GATg4+QE=; b=QDuk2Gq3KwU1uNLcZcAQoWHNV/GI5exEJF1/BSErjCJAlxWdgvYxjrVa62ecaZty8A iBSczdXskha9iNq9K/u4obAH2nQM3Sw6SvNFt4oAPARazC4WanvX9N0Mc9H8kcFSgj97 gVQaCDj7axNNy+VoJzgjt5IseC2dEG25LFZwfWU85S4YUwfw2prurN8Ei7JLUDOUk2xm uUhVL7sMMKBqo2o7C65PNIBsEXLA46eNwUgauU1IcaqKEEHJOCniSTaPf9ycGwUmFV+f nAKzCF+kTNvh9QIe2y6+DSh/Ud3ZC6W5iNwGmO4ZPtSfOf1JomAWiHpI9bIyfJIgmbap 9IiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729948712; x=1730553512; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=r64uDCf/u+FSf366tdEcgHRKSvIf5Hs6IR+GATg4+QE=; b=UU1GAalgCHHg0ol8SQoLHCk9v4Lvq0V8STy0UF/ucl/6cVZDkOy+dCJUlSmGYGZfNh WNSVcRm46E7n7hXd1k8Pzfuc8U7HA0KYpNN1JycFshuIxvQdOcRDH6N5O+FeQvzUruL7 nLl0zqMFGd6umzRs5fIuB4Jry1NmFmS1tJQDbo0JmfDPpeTPlJKYLdwjt4JVe3z36iMj TaNM3fQHEzN8d7ujfGJFMqIZNYRpAh23muVs0IMlKJEajCX5mkeDJrzK+ksqEqJGklvF VwpN4O0apEghFZmNa+ldncmiCN1jUT4m7vyRfHavOAiZGRcPVyPfZMKip7aIK1hcO2IP weFg== X-Gm-Message-State: AOJu0YxvZJe7yPMBsEdHneiK6lI9s0aarv6DAijZDngHXXdgl73R3Hv7 30SoQ56lCrsCmqmvfuR2yypq/B6JB5s926IY+ujnqSo3wd2jsUEEnH3uK/NA3lQKxuN23xDx+oM bpM95sCRlbM7X6OQzmWe92xoBRCk= X-Google-Smtp-Source: AGHT+IE7ri7qdLaOkWPD7idbs5ZiTDV2Mj1xSqBNxk7ILEqfSaYYYXhPdtkAEh2qqBUq2vPYDMA9qXuGP6i7HUldWns= X-Received: by 2002:a05:6102:512c:b0:4a5:e2a8:ec8f with SMTP id ada2fe7eead31-4a8cfb5de31mr1945752137.9.1729948711591; Sat, 26 Oct 2024 06:18:31 -0700 (PDT) In-Reply-To: <87ttcz9hpf.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:294273 Archived-At: --0000000000006f28a70625611219 Content-Type: text/plain; charset="UTF-8" Yes, I imagine that it was once correct and no longer. To help prevent this issue in the future, Tramp could print a message whenever the handler is installed yet commands other than the ones in the list get run. Thanks for the help! I have closed the PR on GitHub. Eyal On Sat, Oct 26, 2024, 06:22 Michael Albinus wrote: > Version: 30.2 > > Eyal Soha writes: > > Hi Eyal, > > > The comment here is not correct: > > > https://github.com/emacs-mirror/emacs/blob/2a6af880b0958d527a4d32005ef9acf3bc4ea030/lisp/net/tramp-sh.el#L3736-L3740 > > The comment was correct. Meanwhile, vc-find-root has been added or > extended, we need file-directorx-p therefore. > > > The command file-directory-p should also be cached. Fortunately, the > > result is already cached so all that is needed is to add this function > > to the list. Performance of the ssh commands for vc-register is > > improved by 170% with this patch. > > > > It's described in detail here: > > https://github.com/emacs-mirror/emacs/pull/43 > > > > How can I help get this patch into the repository? > > Thanks for your comprehensive investigation. I've tried your changes, > Tramp's regression tests still pass. > > So I have pushed it to the repositories. Will appear end of this month > with Tramp 2.7.1.4 on GNU ELPA. Closing the bug. > > > Eyal > > Best regards, Michael. > --0000000000006f28a70625611219 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Yes, I imagine that it was once correct and no longer.

To help prevent this issue in the future, Tramp could print = a message whenever the handler is installed yet commands other than the one= s in the list get run.

Thanks for the help! I have closed the PR on GitHub.

Eyal


On Sat= , Oct 26, 2024, 06:22 Michael Albinus <michael.albinus@gmx.de> wrote:
Version: 30.2

Eyal Soha <eyalsoha@gmail.com> writes:

Hi Eyal,

> The comment here is not correct:
> https://github.com/emacs-mirror/emacs/blob/= 2a6af880b0958d527a4d32005ef9acf3bc4ea030/lisp/net/tramp-sh.el#L3736-L3740

The comment was correct. Meanwhile, vc-find-root has been added or
extended, we need file-directorx-p therefore.

> The command file-directory-p should also be cached.=C2=A0 Fortunately,= the
> result is already cached so all that is needed is to add this function=
> to the list.=C2=A0 Performance of the ssh commands for vc-register is<= br> > improved by 170% with this patch.
>
> It's described in detail here:
>
https://github.com/emacs-mirror/emacs/p= ull/43
>
> How can I help get this patch into the repository?

Thanks for your comprehensive investigation. I've tried your changes, Tramp's regression tests still pass.

So I have pushed it to the repositories. Will appear end of this month
with Tramp 2.7.1.4 on GNU ELPA. Closing the bug.

> Eyal

Best regards, Michael.
--0000000000006f28a70625611219--