From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70036: a fix that Date: Fri, 19 Apr 2024 11:10:16 +0200 Message-ID: <87zftpn2fb.fsf@thornhill.no> References: <4e670617-6483-4159-a5cf-27a921764c38@email.android.com> <87wmot289d.fsf@thornhill.no> Reply-To: Theodor Thornhill 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="19715"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 70036@debbugs.gnu.org, felician.nemeth@gmail.com To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 19 11:11:04 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 1rxkGu-0004uT-0j for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Apr 2024 11:11:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxkGg-0006DW-Fr; Fri, 19 Apr 2024 05:10:50 -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 1rxkGe-0006DI-RQ for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2024 05:10:48 -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 1rxkGe-0003H4-HC for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2024 05:10:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rxkGs-0003Qv-Dr for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2024 05:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Apr 2024 09:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70036 X-GNU-PR-Package: emacs Original-Received: via spool by 70036-submit@debbugs.gnu.org id=B70036.171351784613073 (code B ref 70036); Fri, 19 Apr 2024 09:11:02 +0000 Original-Received: (at 70036) by debbugs.gnu.org; 19 Apr 2024 09:10:46 +0000 Original-Received: from localhost ([127.0.0.1]:57805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxkGZ-0003OH-I4 for submit@debbugs.gnu.org; Fri, 19 Apr 2024 05:10:45 -0400 Original-Received: from out-179.mta1.migadu.com ([2001:41d0:203:375::b3]:27146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxkGX-0003NI-PY for 70036@debbugs.gnu.org; Fri, 19 Apr 2024 05:10:42 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1713517820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DSdEk5U3dmn7ZoTOP61u6S3q318NCDXJAGuBIOAXZrc=; b=0k2KJgc8u+bdG1l7TRsIZMQZ/zJhMgo/sdw8wsKkWXdiC6HR+rUd4zW7AjKFGBa7vvFXGr kyigMT37lFwq86nRd/NrGjd4srgG4JcbKYY3QPR9mcr5pK0WHGwTJ+XjtvqVNt19WFvaEw gjsEYqp+vAJwhzT03iftIAWBHTjhhkeBQ5ReI/m8OQNPe7hlSsbUkczgWzHbVCEo33Qf4E JFVh+EZGvz/2uQax9R6FwdJO5ZlZU43xMf0/x98/jJvhZ+UNTkqKEIixISdTkfb6c9Cjfb ZOznvnHkIKFPtPeRwu8o55EyBcG7+MTm3uCxsfwb+3r1seLXKU9Clikxg/Dqmg== In-Reply-To: X-Migadu-Flow: FLOW_OUT 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:283655 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > On Fri, Apr 19, 2024 at 7:09=E2=80=AFAM Theodor Thornhill wrote: > >> you've also noted earlier. I have an even stronger computer, a 2023 P1 >> gen 5, I believe, running ubuntu. Some servers send _all_ diagnostics on >> every keystroke. > > That could be, but what servers are these? > > Thought it would never be "on every keystroke" though. As you probably > know, Eglot bunches them up in didChange notifications, and you can > can even be the size of these bunches. > Absolutely, it could be. But with these latest changes the felt lag is gone. >> > So my perception is that it must have spent around 4% of 1 second in >> > file-truename. >> > >> > Anyway the reason this shows in this profile is because this project >> > with this particular server sends a lot of publishDiagnostics upfront. >> > That's OK. Gopls is a very good server. I think I see a fix. But can >> > you qualitatively describe the Eglot experience. Do you notice any >> > input lag or something like that? With this project? I didn't feel _a= ny_ >> > lag. >> > Super snappy. Maybe the JSON serde kicking in? >> > >> >> In this particular project I don't notice any input lag. But on every >> java project at work I absolutely do. > > But that could be down to other reasons Theodor. We would need data > for that server too. Last time I tried jdtls (on a docker-based TRAMP > setup, described somewhere in the mailing list), it was snappy. > > If you make a simple recipe like this one I can absolutely > try though. The difficulty in that one was TRAMP. > I can try, but these repros are hard, because it is hard to find an open source java project where I easily can construct similar scenarios. And also time. > >> > Anyway, the idea I suggested earlier is in the patch after my sig. >> > >> > Let's think: LSP's publishDiagnostics coming from the server deals >> > in URIs, right? And we inform the LSP server about URIs, too, right? >> > So the URI is always LSP's idea of the resource identifier (and it lik= es >> > to have truename URI). >> >> Sure, like in my key/value store. (apart from symlinking) > > The other difference is it uses buffer-local variables as the > natural "per-buffer" storage method. > Yes, sure. Not arguing there. Just noticing that what we're doing here isn't too different. >> Could we rather use eglot--managed-buffers, like in my patch? there >> shouldn't be a need to loop through say 200 buffers that are unrelated >> to the project in question, right? Apart from this I agree, and will try >> it. > > Of course, that's a good improvement. > > Jo=C3=A3o :thumbsup: Theo