From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#61350: Eglot over Tramp freezes with large project Date: Sat, 11 Mar 2023 11:42:13 +0000 Message-ID: <87mt4jzf8q.fsf@gmail.com> References: <87y1ootw2t.fsf@gmail.com> <87wn43e9ht.fsf@gmail.com> <874jr6oont.fsf@gmx.de> <87sfeqd4zi.fsf@gmail.com> <877cw1swjm.fsf@gmx.de> <87k0016dgo.fsf@gmx.de> <1458446553.50372.1677606917251@office.mailbox.org> <87ilfkh89k.fsf@gmail.com> <87y1ofct83.fsf@gmx.de> <87356n8kja.fsf@gmail.com> <877cvvfnp6.fsf@gmx.de> <54377687.213790.1678016749459@office.mailbox.org> <87356jfktc.fsf@gmx.de> <87a60ovi90.fsf@gmx.de> <31964054.380679.1678194256931@office.mailbox.org> <87r0u0u0rl.fsf@gmx.de> <87mt4otyy1.fsf@gmx.de> <87pm9fk6ht.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34916"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Thomas Koch , 61350@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 11 12:41:15 2023 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 1paxb9-0008xp-58 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Mar 2023 12:41:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paxax-00022c-Rt; Sat, 11 Mar 2023 06:41: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 1paxaw-00022N-G0 for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2023 06:41:02 -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 1paxaw-0002N3-5u for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2023 06:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1paxav-0002v3-Pv for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2023 06:41:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Mar 2023 11:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61350 X-GNU-PR-Package: emacs Original-Received: via spool by 61350-submit@debbugs.gnu.org id=B61350.167853482411170 (code B ref 61350); Sat, 11 Mar 2023 11:41:01 +0000 Original-Received: (at 61350) by debbugs.gnu.org; 11 Mar 2023 11:40:24 +0000 Original-Received: from localhost ([127.0.0.1]:56660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paxaJ-0002u6-Tv for submit@debbugs.gnu.org; Sat, 11 Mar 2023 06:40:24 -0500 Original-Received: from mail-wr1-f45.google.com ([209.85.221.45]:43928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paxaH-0002tr-PR for 61350@debbugs.gnu.org; Sat, 11 Mar 2023 06:40:22 -0500 Original-Received: by mail-wr1-f45.google.com with SMTP id e13so7326547wro.10 for <61350@debbugs.gnu.org>; Sat, 11 Mar 2023 03:40:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678534815; h=content-transfer-encoding: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=K0iTRJ1atoXjCUQAKlsCxfKTxr+joBGUMOT2QIm7v1w=; b=SNrvWJ+zEhEZZ9qg3euM3spj1cgf7qKsUb64io6slrGdDYjVo0LliUPDQNTIuiGlyV DRLMOtOTWOX/d3oMHs1sJNOaz7NnJv6zwruK8YXyEqzCyovbUXzY7uTPWu7im3YhgqEJ 44IVuiJrMU+28jGYWgW24Ec4O6VtxAWgDAR99BmzSj53FnARIzHPv/8nDFX6RXGS4FxC Ty8996dytaTHafwahpKVwkj6OmGDtn/ksDKy+chHCEof/1W0JmfF3dtozEIp0vr6qFW4 AMGJRbG69cQbYn768yIaNm9nw92a8FUpTzbPZ0mTCobGmj9Kh+oR1E6bUU6ORxPd7fT/ iG/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678534815; h=content-transfer-encoding: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=K0iTRJ1atoXjCUQAKlsCxfKTxr+joBGUMOT2QIm7v1w=; b=q0uJH3UXh8mRLL6t4yBOnORAKVP9F0TzgGZvQhLHHA9KOus/DHZuQu2YpyPnYJpT0z kQvd83t1xWCH8agYxKLUtoRNUH8pvaSFUEwbvINuRaX8qBuNrd2gM8FxFIkK5NuGb0Gx ZRe81kRi3YI2udVMbyitwScLHvD6eQs0e005XChTHDnmlPCycqq7RmYmD0e9ImVLnpVI p6V3wnxT6ci/kFGECfBI1yffUBVt5exI2wc3tuJYnedBkauB5bvfW6whrYAqu8D1mOVO CuVsbyxSAi+v6ENHqQFH/4d5xiE6DynGNKj/mHO06uNEOp+T2KhLpFXemo2IB/T+1knj wdkg== X-Gm-Message-State: AO0yUKUjiI+Hbe4JOvbdbQSG+18IzzLegaRkrbSm7dQgHAkw9HRzDfKS ABT39+QHKXRrV7Wc51JqSAj9DPRdB/s= X-Google-Smtp-Source: AK7set+CjqAQIPK0q+41rUr6ozbik+6NCg0ev+wRqYNE2GpSvzjLBjfdAwy4c8jxyZUFzvmjT5av2w== X-Received: by 2002:a05:6000:1b0c:b0:2c5:584b:4f65 with SMTP id f12-20020a0560001b0c00b002c5584b4f65mr18400078wrz.32.1678534815522; Sat, 11 Mar 2023 03:40:15 -0800 (PST) Original-Received: from krug (87-196-72-142.net.novis.pt. [87.196.72.142]) by smtp.gmail.com with ESMTPSA id p10-20020adfe60a000000b002cda9aa1dc1sm2300217wrm.111.2023.03.11.03.40.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Mar 2023 03:40:15 -0800 (PST) In-Reply-To: <87pm9fk6ht.fsf@gmx.de> (Michael Albinus's message of "Sat, 11 Mar 2023 10:00:14 +0100") 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:257778 Archived-At: Michael Albinus writes: >>> I will do that later. But 10 out of 10 successes in your testing is >>> a pretty solid indication that this is on the right track. > > No further comments, so I guess it is OK for you? I think the patch goes in the right direction. The force resetting of 'timeout' to 0, which you highlighted earlier, is odd. + (dolist (p (delq proc (process-list))) + (when (tramp-file-name-equal-p + (process-get proc 'vector) (process-get p 'vector)) + (setq timeout (or timeout 0)) + (accept-process-output p 0 nil t))) That's because callers of 'tramp-accept-process-output' who call it with TIMEOUT=3Dnil will now see their expectations violated depending on conditions they do not control. You fully control these callers, so you may know better, but I think this patch makes more sense, because it keeps the contract.=20=20 + (dolist (p (delq proc (process-list))) + (when (tramp-file-name-equal-p + (process-get proc 'vector) (process-get p 'vector)) + (while (accept-process-output p 0 nil t)))) (with-current-buffer (process-buffer proc) (let ((inhibit-read-only t) last-coding-system-used This is even more "conservative" than your patch, because it deviates less from the current behaviour. I've tested it (first removing the eglot.el workaround) with my reproduction recipe to a 100% success rate in 6-7 experiments (whereas without it it is 0%). > I plan to install the patch next days on master, unless you oppose. I don't, but consider my alternative. Jo=C3=A3o PS: And I also think that Eglot over Tramp does seem to have become faster with ControlMaster, at least in a subjective evaluation.