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#64122: 30.0.50; The new Eglot mode line UI show too many 100% when input characters Date: Fri, 2 Feb 2024 09:25:22 +0000 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="10586"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eason Huang , 64122@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 02 10:26:20 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 1rVpoR-0002Xq-GD for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Feb 2024 10:26:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVpo5-0007N2-9x; Fri, 02 Feb 2024 04:25:57 -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 1rVpnz-0007Me-T2 for bug-gnu-emacs@gnu.org; Fri, 02 Feb 2024 04:25:52 -0500 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 1rVpnz-0002PU-Ks for bug-gnu-emacs@gnu.org; Fri, 02 Feb 2024 04:25:51 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rVpo9-00052Z-Vb for bug-gnu-emacs@gnu.org; Fri, 02 Feb 2024 04:26:02 -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: Fri, 02 Feb 2024 09:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64122 X-GNU-PR-Package: emacs Original-Received: via spool by 64122-submit@debbugs.gnu.org id=B64122.170686595519359 (code B ref 64122); Fri, 02 Feb 2024 09:26:01 +0000 Original-Received: (at 64122) by debbugs.gnu.org; 2 Feb 2024 09:25:55 +0000 Original-Received: from localhost ([127.0.0.1]:43736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVpo2-00052B-J3 for submit@debbugs.gnu.org; Fri, 02 Feb 2024 04:25:54 -0500 Original-Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:42014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVpnz-00051x-Gk for 64122@debbugs.gnu.org; Fri, 02 Feb 2024 04:25:53 -0500 Original-Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2d0874d42d4so3836011fa.0 for <64122@debbugs.gnu.org>; Fri, 02 Feb 2024 01:25:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706865934; x=1707470734; 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=KpPTiYJCT3cgIaHdPWrS0RA0FrvYVY22oUIEiDhFdvY=; b=HQUssiKaQWgMOxHBm9KW+ClFMWwo+o3H/bLfrvjaOKonQmsrMWiG8GM2SIGKLE4WLo NU3Bj/19KK2P+cIDipwb5/7BzElhsxNxzw21oKD+ytOxz1Jxjv2w7WleakPlDwWgjrXf a7vNghvnWPOoZm4jRvD9qTBTg1cC+oAdt1ek9UiqZZxEImm5S3ijrn21kD4lhYKdnLmI NAhivzHiVgLgJmNFsAQsDwOjYzu3KCHw7ouQdJSuxY3lotu344/BgGP1dIPBbVO3mnS1 NzQ+1ewnHK8K2V90yqx+mLoJNagu3hw6aaYyiXNqcazih3LWeIR1Of/nJSyG3aw6+6UD wuTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706865934; x=1707470734; 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=KpPTiYJCT3cgIaHdPWrS0RA0FrvYVY22oUIEiDhFdvY=; b=qe3FN1MpyuAqh6gadRrbQDqEBtxS9sYrv5KTe3ci1T1fHuhvtuuWTfhrd9RYP5PIal n82vS+VGrHw5etAxgrpf6z32XgGaTLLjBHvKc3swNwLL5l6EGc6OLCajkINiVnWc7tcG p1Fc5w5aVv23vGy0t5URs8Xz80y48Xbtrcumx2WGpWAsSph09kxbsibIR2u1oLOhsOnh BKDocr6BFwk+l9lWeq2Tkr+pXh9RBQXmUG4T1UpEqrdFQM6YPCyXaWArrAy2Fw/N6oNq b548W2SKooU0pA6jsm1YtZ/H0PHO2zwEQcIcJNPd7Bswpa7xrvZ9iJK75yI/7tI/tFeZ H+Iw== X-Gm-Message-State: AOJu0YxPxkTtNxrbVn9SUIv99o60zodB60FHOuHxZplg+ldZK9gzHn2F NvBv68uJGTfmlWzl67hZ9MVjO90RsjTWDPi8jQrOwQ0vI+4QbQAMon+cycqRDIH4NzRkyGfUZpZ Mu+ATCjJP1ilJvdpSrFsvSxVBy+c= X-Google-Smtp-Source: AGHT+IEK5n9T8w94CzAL5pDPvXP37EFal35WWehyk7oceJkXl8Z/YAEpBZcpd2cNvEkY98OyvVOw6GsuDSUN+iNXOXI= X-Received: by 2002:a2e:9dcb:0:b0:2d0:4d21:9c25 with SMTP id x11-20020a2e9dcb000000b002d04d219c25mr530479ljj.17.1706865934312; Fri, 02 Feb 2024 01:25:34 -0800 (PST) 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:279341 Archived-At: On Fri, Feb 2, 2024 at 7:34=E2=80=AFAM Stefan Kangas wrote: > > Eason Huang writes: > > > Eason Huang writes: > > > >> Hi Jo=C3=A3o, > >> > >> I found that Eglot mode line UI will show many 100% when using with > >> python-lsp-server, such as [Eglot:100%/100%/100%/100%/100%]. > >> > >> Is it possible to disable it and only show the [Eglot:ProjecName] in > >> mode-line? > >> > >> > >> steps to reproduce: > >> > >> 1. install python-lsp-server: > >> https://github.com/python-lsp/python-lsp-server > >> `pip install python-lsp-server` > >> 2. Start Emacs with `emacs -Q` > >> 3. open a python file with `C-x C-f ~/test.py` > >> 4. start Eglot with `M-x eglot`, choose `pylsp` as the server. > >> 5. Input some blank line the test.py buffer and you will see the issue= . > >> In the mode line, there are always showing many 100%, such as > >> [Eglot:100%/100%/100%/100%/100%] > >> > >> This issue also happen when using eglot on Java with Eclipse JDT > >> Language Server[https://github.com/eclipse/eclipse.jdt.ls] > >> > >> This issue make the servers unusable on Eglot, because it will > >> influence the performance, and I can feel the delay when input charact= ers. > >> > > > > > > `(setopt eglot-report-progress nil)` can fix this issue. > > Jo=C3=A3o, any comments here? * There might be display bug, which would be down to not calling force-mode-line-update often enough. I also see the indicators linger, sometimes and it's annoying, but goes away soon enough In any case this "there are always showing many 100%" is is maybe coloured by some creativity of interpretation :-) IME they go away after some time. * It might just be the intended behaviour. Each of those percentage indications is a separate "progress operation" that the server wants to report on. We could cap the number of such progress operations displayed to some upper limit. * As to the performance problem, I doubt it is related to the display logic itself, and is more likely due the usually frenetic JSON communication that happens during bootup. Up until relatively recently, this slowdown wasn't even due to the communication itself, but due to the logging of such communication. And _that_ problem is mostly probably gone. So to summarize: * For the performance, we would need measurements, i.e. profiler-start, profiler-stop, profiler-report for the "slowdown case" and the "fix this issue" case. * For the minor display bug, I'll see if I can make the 100% go away quicker. * I think the "cap number of progress operations" feature I floated would be most likely bloat, since this is relatively minor, so that's for the next maintainer to decide ;-) Jo=C3=A3o