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#66669: 30.0.50; [EGLOT] Emacs freezes when server sends a ton of progress notifications Date: Sat, 21 Oct 2023 22:01:50 +0100 Message-ID: References: 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="2073"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66669@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 21 22:59:53 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 1quJ4a-0000Oj-Oh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 Oct 2023 22:59:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quJ4L-00079u-FB; Sat, 21 Oct 2023 16:59:37 -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 1quJ4J-00079h-Hk for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 16:59:35 -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 1quJ4J-000169-9a for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 16:59:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1quJ4k-0006y1-Rk for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2023 17:00:02 -0400 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, 21 Oct 2023 21:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66669 X-GNU-PR-Package: emacs Original-Received: via spool by 66669-submit@debbugs.gnu.org id=B66669.169792198026720 (code B ref 66669); Sat, 21 Oct 2023 21:00:02 +0000 Original-Received: (at 66669) by debbugs.gnu.org; 21 Oct 2023 20:59:40 +0000 Original-Received: from localhost ([127.0.0.1]:45162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quJ4O-0006wt-HJ for submit@debbugs.gnu.org; Sat, 21 Oct 2023 16:59:40 -0400 Original-Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]:55631) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quJ4K-0006we-5j for 66669@debbugs.gnu.org; Sat, 21 Oct 2023 16:59:38 -0400 Original-Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-507b96095abso2911647e87.3 for <66669@debbugs.gnu.org>; Sat, 21 Oct 2023 13:59:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697921942; x=1698526742; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=D5g+T2QZ5Aofo7YZ2uyIYAhbztErbkaudyDp0dpHgDo=; b=ZeC3MOEs8LMgxjlv4/Ld7k22BiegMdTsyt6EUgkGmTpRcoBNpzutVpq/lZz9QuEbp9 qCl8r+ovRc5JPoU9JIhh+TLHvWgdYUdPVzsOnFS2H2tsktPV5Z1EdYWZCvG6udAWG/VM 9byluf9xlfMHjW2VRyPf55n62fpRT/f8wJkGpusDhw9fteQVcAEqbF572XGkxKQ4qbTK FYwR99MFVx6sPesqYb+DiQ64199GuNIr9+6/kOHDFDMjt/cmQ5+c0cECY6b3Mjm1yuk4 ESID8K28GwtdcdVfb39Jm25Q1Augc1bgLLbXEwclMgX7AAnlOR6y3krYO9bA6tESgzns 5iwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697921942; x=1698526742; h=content-transfer-encoding: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=D5g+T2QZ5Aofo7YZ2uyIYAhbztErbkaudyDp0dpHgDo=; b=JXqYj9M0ah9msypB5KLysezWiAwlmw/H4YFAGqaOUBKXKtgGee9jslD8eGmYuu9H2T di7oDGss94DABKlbzDfHBDGJeqD9pNjjMIHK5NKzvsS+zRq8+b4ErQGqU7RsN8F5UZM+ +ABpGmUjN2zKQM5G1EVMUXnN2fhSA7XJfPScF80NM/J9E7g7VYYIxolMY5xGiYvMWntW 4ul5I4sUOtVc0qCOnreT3GQW4VyDaTPdXfo2XxgnaAsILLBvi30uWbunyqYBrLmikxuG +g9EKIGVYZ4wqIyL2JLDze59COZUM3FhBornWCz0TvwCEolCo9z03+nEomnXWCRj+Pxu CwOQ== X-Gm-Message-State: AOJu0Yynuol0r+p+vzlUmHB3H3ESMuAmsepFerwvrlmau4MlSQ4LBQxt s/lZmWRIKCRr+PXGU+bxYnxrC/gi70NvTnR0Btw2olI5Fz5JTQ== X-Google-Smtp-Source: AGHT+IGpOsgfSgLC1mwPGpW4copCsTrdyuy5LRCsERJbNp8Y4reNPompwdjLZkDTP0EGFsdjpc3AwnSEcS4Ge6uQ5os= X-Received: by 2002:ac2:5e8f:0:b0:506:8e27:7ce9 with SMTP id b15-20020ac25e8f000000b005068e277ce9mr3008767lfq.16.1697921941815; Sat, 21 Oct 2023 13:59:01 -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:272939 Archived-At: On Sat, Oct 21, 2023 at 8:11=E2=80=AFPM Yuan Fu wrote: > > X-Debbugs-CC: joaotavora@gmail.com > > I use rust=E2=80=99s language server (rust-analyzer) with eglot. And > whenever I turn eglot on for a project, Emacs freezes for a good > 30 seconds, busy updating the eglot progress indicator, before I > can do anything. I think the reason is that the rust language server > sends a ton of progress notifications, which completely blocks Emacs > before it=E2=80=99s done. hi Yuan, Two things: * Would be nice to have a reproduction recipe. I have rust-analyzer but one project where I try it regularly, the "bevy" graphics engine [1] Seems to work OK there. You say "a project", but for bevy it starts up fast (maybe not even half a second) and works quite well. No Emacs freeze at all. Tried removing the cache with git clean -fdx and I get all the notifications cleanly with no slowdown. So please include Emacs versions (master preferred, should be trivial for you), Eglot version, rust-analyzer version and preferably an Emacs -Q invocation with the simplest Rust project you can share that exhibits this behaviour. * Have you profiled? Have you tried setting eglot-events-buffer-size to 0 (and restart Eglot) as suggested in the Eglot manual? Many performance problems are due to JSON objects being pretty printed in the Eglot events buffer (BTW some users ask me to turn it to 0 by default, but the pros don't outweigh the cons, which in this case is we would lose a valuable tool for newbie users with exotic servers to send me their debug data easily) Jo=C3=A3o [1] https://github.com/bevyengine/bevy