From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ship Mints Newsgroups: gmane.emacs.bugs Subject: bug#73718: 31.0.50; Severe performance issue with Tramp and project-mode-line-format Date: Wed, 9 Oct 2024 10:01:14 -0400 Message-ID: References: <874j5lzhdn.fsf.ref@aol.com> <874j5lzhdn.fsf@aol.com> <29ebe27b-89d6-4861-8c5e-3db50a1660f3@yandex.ru> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000008bb9a006240bb02e" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3239"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Ergus , Michael Albinus , 73718@debbugs.gnu.org, Juri Linkov To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 09 16:03:12 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 1syXHU-0000ab-Ea for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Oct 2024 16:03:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1syXHD-00015Q-0L; Wed, 09 Oct 2024 10:02:55 -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 1syXHB-00013s-4c for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2024 10:02:53 -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 1syXHA-0006gg-M0 for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2024 10:02:52 -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=6j9MltdHUOFIO8wydismYPRX+m92rEPla+b3LkU0XW4=; b=TBxVxwnFx/LQYIY9cVXekUQjyA5E3kruCtSfeJTJCZdV+zDVWpKrOimg2x2JkmfFx/PPrdD93YmzOsL+YDN3UauotNDRUgQHS7CRAaqMPOCYw3PxMzWQBmgZ2iGm53YpT31e1C5VokdY2KZUFZItzi/IZ1XGABYapqm/xxEMGAdBFl5ZnYp1+JFQuhxLDNgXPgTvkRjLAxrnieLezhwh6eAECujNe6yXU8sy9GH5K6IY6C2Q8l6t8me3+uiIYf5UuLupy4KcZvseit7sfCs+SBGEw0z58rLopK7mw7Op2PLUf26Okgz0xus9wqcVCIkazPsqv5WM/3EegsuEZBKpIw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1syXHK-0001KV-EV for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2024 10:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ship Mints Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Oct 2024 14:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73718 X-GNU-PR-Package: emacs Original-Received: via spool by 73718-submit@debbugs.gnu.org id=B73718.17284825645058 (code B ref 73718); Wed, 09 Oct 2024 14:03:02 +0000 Original-Received: (at 73718) by debbugs.gnu.org; 9 Oct 2024 14:02:44 +0000 Original-Received: from localhost ([127.0.0.1]:57200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syXH1-0001JQ-Us for submit@debbugs.gnu.org; Wed, 09 Oct 2024 10:02:44 -0400 Original-Received: from mail-ua1-f41.google.com ([209.85.222.41]:56810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syXGz-0001Ip-FO for 73718@debbugs.gnu.org; Wed, 09 Oct 2024 10:02:42 -0400 Original-Received: by mail-ua1-f41.google.com with SMTP id a1e0cc1a2514c-84ead864cd4so1857418241.1 for <73718@debbugs.gnu.org>; Wed, 09 Oct 2024 07:02:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728482486; x=1729087286; 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=6j9MltdHUOFIO8wydismYPRX+m92rEPla+b3LkU0XW4=; b=Wt3gZDKMhMKiSa2zsUhgP1CbJW2tHdimobGRX9Hx6eTJOAX7QzKzBAZ6xsU64cYrwz wTt9pFoGf3nFmf7/Zjg9eZjEcKnfKLNgloyAD0xXNuYSIErYxzdPx4ohYJOSqROnfMOb qINDkGg5e3Qz0q6LGTxWOgSZprqD9pnCIcF8923K1vPK4K2e4TX86FBMF1TKLqWJIjER KSycMitH+tfzcNtjFGPEO8Fe4n9DfdE4sdw+P9MPwnt/+RTplFotI0GPKp3R7Hmv9twQ UpOCOJrKOpCK+qqmtccTbNQW2EVkp4cCnvd89fOk2uSjHUXK9paOcnPp+3S2d4BrQzer s0IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728482486; x=1729087286; 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=6j9MltdHUOFIO8wydismYPRX+m92rEPla+b3LkU0XW4=; b=K95mq81kPfmCtSu6nndXj7PVSVqWBI5z2Wgb0JVeJK2lCPtqciV5PsmmydFgx6QOoA OcXBJXo/DBChTNnj17WaudH5sxZrkI0k14uNJw2ULUxJfss33m8T9hWJov22X9woFgkJ qd37lElqmtUliOgI/GAIcVoPGLS1/YpjcHftR+DSFEPJ6xc14Ja08A4goFZNNcVRjQzD X35zB2E7cIceF0JKhvTJ3hiLeIuSrh8XBbwOaHNv06DF1ZYibG0PUYerN/xI1UhbIxQZ 8/9r1B1Ji02h9F4/z6j+sQ5tpetkOk+1b3APKWeRVeaM2fBW/ZrbXVHzgWX1NzwOzGww QNzg== X-Forwarded-Encrypted: i=1; AJvYcCUjdBYlOoT5MUbxtJ2CUr6tvOS+nT0r3obryYyI2J9Rs0I3LZW6U37+MeC1k3XfNpWjhK0Dhw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzdgqRTv2EHYhxD8SzR0B5IuXaZSsUcVlhW1lboURIvcGA9RcMF 3/hfifN3Uus0yDdTmrjqzxuHUKFYsRmrkiyS4QMLWMvBjV77fDSSCkprcrpRFoxpX1b7yXOBswX xWRWIRithEMcbTcFfMJmbR6r6R9Q= X-Google-Smtp-Source: AGHT+IEaVreZjrtMfZ+zMuYqT+pKNNV8V1GrMM2iXlIu3kHPg4hvJBJVzHdnnYDuh4DsdDdA1uGRJkoSQjTxLx+wUjE= X-Received: by 2002:a05:6122:1811:b0:4f5:2a41:d10e with SMTP id 71dfb90a1353d-50cf0c83bcamr1565911e0c.10.1728482485447; Wed, 09 Oct 2024 07:01:25 -0700 (PDT) In-Reply-To: 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:293214 Archived-At: --0000000000008bb9a006240bb02e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable To be clearer, I've guarded project-try-vc with advice. Perhaps a user option to enable the guard intrinsically would be better as everyone could benefit. I have my own option variables doing this so I can enable it when wanted. Perhaps Ergus can give something similar a try and see if this solves his immediate hanging concern. Ergus, you should be able to just drop the below snippet in your init file (or eval in *scratch*) and see if it works for you. (defun my/project-try-vc-advice (orig-fun dir) (or (vc-file-getprop dir 'project-vc) (if (file-remote-p dir) nil (funcall orig-fun dir)))) (advice-add 'project-try-vc :around #'my/project-try-vc-advice)) On Wed, Oct 9, 2024 at 9:45=E2=80=AFAM Ship Mints wro= te: > I've added file-remote-p guards in a variety of places specifically to > avoid these issues. > > On Wed, Oct 9, 2024 at 9:39=E2=80=AFAM Dmitry Gutov wr= ote: > >> Hi! >> >> On 09/10/2024 13:43, Ergus via Bug reports for GNU Emacs, the Swiss army >> knife of text editors wrote: >> > I made a profile and it looks like there is some bad interaction betwe= en >> > project-mode-line and tramp names >> > >> > I already tried: >> > >> > (connection-local-set-profile-variables 'my-profile >> '((project-mode-line . nil))) >> > (connection-local-set-profiles '(:application tramp :user "myuser") >> 'my-profile) >> > >> > But is not disabling the modeline for remote files. >> >> I wonder if we'll need to disable project-mode-line in remote files >> altogether, or if this is a problem that could be solved in Tramp (with >> extra caching?) >> >> To use connect-local value to disable, BTW, it would need to have extra >> code called from the mode line format (in bindings.el). And it's a part >> that was added only recently, for in Emacs 30. >> >> >> >> --0000000000008bb9a006240bb02e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
To be clearer, I've guarded project-try-vc with advice. Perhaps a us= er option to enable the guard intrinsically would be better as everyone cou= ld benefit. I have my own option variables doing this so I can enable it wh= en wanted.

Pe= rhaps Ergus can give something similar a try and see if this solves his imm= ediate hanging concern.

Ergus, you should be able to just drop the below snippet in your= init file (or eval in *scratch*) and see if it works for you.

=C2=A0 (defun my/project= -try-vc-advice (orig-fun dir)
=C2=A0 =C2=A0 (or (vc-file-getprop dir = 9;project-vc)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (if (file-remote-p dir)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 nil
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (funcall orig-fun dir))))
=C2=A0 (ad= vice-add 'project-try-vc :around #'my/project-try-vc-advice))


On Wed, Oct 9, 2024 at 9:4= 5=E2=80=AFAM Ship Mints <shipmints@gmail.com> wrote:
I've added=C2=A0file-remote-p guard= s in a variety of places specifically to avoid these issues.=C2=A0

On = Wed, Oct 9, 2024 at 9:39=E2=80=AFAM Dmitry Gutov <dgutov@yandex.ru> wrote:
Hi!

On 09/10/2024 13:43, Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote:
> I made a profile and it looks like there is some bad interaction betwe= en
> project-mode-line and tramp names
>
> I already tried:
>
> (connection-local-set-profile-variables 'my-profile '((project= -mode-line . nil)))
> (connection-local-set-profiles '(:application tramp :user "my= user") 'my-profile)
>
> But is not disabling the modeline for remote files.

I wonder if we'll need to disable project-mode-line in remote files altogether, or if this is a problem that could be solved in Tramp (with extra caching?)

To use connect-local value to disable, BTW, it would need to have extra code called from the mode line format (in bindings.el). And it's a part=
that was added only recently, for in Emacs 30.



--0000000000008bb9a006240bb02e--