GNU bug report logs - #63651
possible eglot xref-find-references optimization

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Alan Donovan <adonovan@HIDDEN>; dated Mon, 22 May 2023 17:47:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 63651 <at> debbugs.gnu.org:


Received: (at 63651) by debbugs.gnu.org; 4 Jul 2023 13:56:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 04 09:56:21 2023
Received: from localhost ([127.0.0.1]:36387 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qGgVx-0004v6-FV
	for submit <at> debbugs.gnu.org; Tue, 04 Jul 2023 09:56:21 -0400
Received: from mail-pl1-f175.google.com ([209.85.214.175]:36118)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <adonovan@HIDDEN>) id 1qGgVr-0004uz-FS
 for 63651 <at> debbugs.gnu.org; Tue, 04 Jul 2023 09:56:20 -0400
Received: by mail-pl1-f175.google.com with SMTP id
 d9443c01a7336-1b8161f564dso491665ad.1
 for <63651 <at> debbugs.gnu.org>; Tue, 04 Jul 2023 06:56:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=google.com; s=20221208; t=1688478969; x=1691070969;
 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=tS7/4BHRg0i3eUf70kn3Z0ziiP0o/bI6LQnzMzoQKsM=;
 b=bSB9unV3pU3vThCTO5nBR1f0Dm2eorMlsYZdsKc1v4TJW4xTQGk1d0rw68M3M8OhLF
 55faofl3dqc3g9G5vbACchc9AVZ07epP5QVoHXZLFHWLIm7MfWqsXy4T3zAZrdFwLLer
 FDhJxyV768O4sDrJPE59gxwLz49g28yLJlFyAY34ZNTgGybBjhoINOvYvW37YPD2XaEB
 lYXkoiyWdDxSsZv5eruScm3tWGYGO25MBWMgIXgGUmiw/SfCcegvkKpcEJu2hTDg4eiU
 XKSXa5hLhqvA18Q0Of/suF8YIQ8KYoiIinoitAILs0fkGuHnmBGezwvSCE/gvOz8I+fI
 XlbA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1688478969; x=1691070969;
 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=tS7/4BHRg0i3eUf70kn3Z0ziiP0o/bI6LQnzMzoQKsM=;
 b=kk2i6fpZ8jI6XM65rxQjD8sY2s1FQIQHR2f44cVl+P3EXHqQi6eqo7DKy11scikk7U
 F8nHFpOVPH8KaoNN61jVek/F/wS3J1qkNpOu8FwP9iDIm18uQasB00H37GLZxjh7uEDO
 6Sq+T2Km0GCD9UfjrisC0u7xfgf4qW8DcCR/F7m49B96p61DH+0+4RMwIkOAsFQ7iIAL
 CHHs2A3HQYO0QaooX7wWUWk5rrVwoHsme7H++pxADIPVM97xlE7MCAzmUVEgV6qXYnSg
 Pe8AszPTCGiPLPt44XS2XBfuZn47+LoVH2mRHdEuiZMpcj6xxiDMj8Vs72qdlsrlQ6pr
 5KZw==
X-Gm-Message-State: ABy/qLaedccoDMyTXcjw3aidqum8ZH5Xzn5Dz8YQww8YTWOSdqMs5ywo
 s1UMiFH0SrBQ/yEwsfrwu3/K6aNqLy0dkVJckjuGXQ==
X-Google-Smtp-Source: APBJJlFbq8IDVdx5Ru6uozYCH8Ud/dJGe7KeelxMzn+FbLak0uCX7Z9smAVmZxUExwCezsc6J2da1ugmkgYpxKIVZHk=
X-Received: by 2002:a17:902:e742:b0:1ae:4bbb:e971 with SMTP id
 p2-20020a170902e74200b001ae4bbbe971mr151167plf.19.1688478969275; Tue, 04 Jul
 2023 06:56:09 -0700 (PDT)
MIME-Version: 1.0
References: <CAPVWWDXj+au=50v00jK7DNGFX33p7uyz_x+iQMGxk6Gu2p5saA@HIDDEN>
 <CAPVWWDVVA+pp6Yo4e=hDysii_0HL8pJQ+HzLXUPWNePxcdnQfQ@HIDDEN>
 <CALDnm51L=uL3nmh3Zj6AGh3pma9b7p5paJXVX7=2=DxUYDopRA@HIDDEN>
 <CAPVWWDUqoJWUEF9-2ziMiTtFdA_EqV07ME-uSjGv+GWp=cgO0Q@HIDDEN>
In-Reply-To: <CAPVWWDUqoJWUEF9-2ziMiTtFdA_EqV07ME-uSjGv+GWp=cgO0Q@HIDDEN>
From: Alan Donovan <adonovan@HIDDEN>
Date: Tue, 4 Jul 2023 09:55:57 -0400
Message-ID: <CAPVWWDVZBOT7zddtgksGUsZgX1T_ALDrxeNixePJY4bmUVjw4A@HIDDEN>
Subject: Re: bug#63651: possible eglot xref-find-references optimization
To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -8.0 (--------)
X-Debbugs-Envelope-To: 63651
Cc: 63651 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -9.0 (---------)

Any progress? Were you able to observe the problem?

cheers
alan

On Wed, 24 May 2023 at 17:22, Alan Donovan <adonovan@HIDDEN> wrote:
>
> On Wed, 24 May 2023 at 12:29, Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN=
> wrote:
> > Thanks for reporting this Alan, it is an interesting point. (Next time =
you can add me on CC directly so that i don't miss the message in this list=
, which i don't always track closely)
>
> Will do.
>
> > Could you provide a test case where these ~=3D 1300 xref matches are pr=
oduced? I suppose it is some Go repository? With a standard gopls? But whic=
h file/position and which command should one use?
>
> $ git clone https://github.com/golang/tools
> $ cd tools
> $ (cd gopls && go install)   # if you don't have it already
> $ emacs gopls/internal/lsp/cache/analysis.go
> Then search for fmt.Sprintf (e.g. on L246) and do xref-find-references
> on it. I get about 1300 matches.
>
> cheers
> alan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#63651; Package emacs. Full text available.

Message received at 63651 <at> debbugs.gnu.org:


Received: (at 63651) by debbugs.gnu.org; 24 May 2023 21:23:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 24 17:23:10 2023
Received: from localhost ([127.0.0.1]:45266 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q1vwr-0001Xf-Sc
	for submit <at> debbugs.gnu.org; Wed, 24 May 2023 17:23:10 -0400
Received: from mail-pl1-f178.google.com ([209.85.214.178]:35922)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <adonovan@HIDDEN>) id 1q1vwq-0001XT-DN
 for 63651 <at> debbugs.gnu.org; Wed, 24 May 2023 17:23:09 -0400
Received: by mail-pl1-f178.google.com with SMTP id
 d9443c01a7336-1a950b982d4so50505ad.0
 for <63651 <at> debbugs.gnu.org>; Wed, 24 May 2023 14:23:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=google.com; s=20221208; t=1684963382; x=1687555382;
 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=8Op7dgVaaWVgHtIsioHYhmUV/0wi+tQsly0L3Vnj/fs=;
 b=X5jslPnbhiXbAc0xEo8eoiSqR06bDYLOsi4Y79VAnlkhpL5PmPwn2ExpsZjVxo2uOU
 o0Bg6ueEjgnbP5mff17V/X87w5R9jzRWNJfsyJS+X8N4eu6d18AvWY31lSjKiNqHHwZS
 z2FqIR6VRtFUr9WascvJfFemF4cl+LRETEIRXLPhiO0hod59kd5firuHp3LcKvrJi051
 XkA730kFX/TUKp2Pp7+ko2khdj3JWM4Uwp7dwcX+P2S1Qz7pLeB54kh72AbzlTeKGpGc
 Gagy+b9Fxi6sXbLgAUxflxlMtNwKupcZV8M787tX+Kga2xTQ1sIEZHul39fORm+TsDd9
 ACnw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1684963382; x=1687555382;
 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=8Op7dgVaaWVgHtIsioHYhmUV/0wi+tQsly0L3Vnj/fs=;
 b=fEHn6HUmCNcWBM//9ee/3tR8/sDbR9txfO7BjFfX+wRbajbgTc6U42F7j9gzzsOOhe
 jnCGda7JaPbzFfoDMTJ3XIQ+q4GdAoykKeHNxdc1ETrpvaugPAb8jbNz+u2lJOsjNVw5
 F2AE5OjYYodE8v7MyQs6cZ1ZZuMEX3V5e+FkTbL+0xkW/Ii4GdJePWimeFUDp23Qjbkr
 u8KZzcjoO1qYCwQxJtvj8E5R9jTDfUQjS2U6cBNz1tDhKTVusBmFDylfuhqqUFahcIwk
 7ol9pJWN/zkvTOHyD/FGzqR412ruL8+JcNOt372jvzlePb/LWW1sQRIC0X0jgKOzwL4+
 zLxg==
X-Gm-Message-State: AC+VfDzENKlNMRs7XQquRhnbzpf+PTuzW+gVDc94sX9Lp8t4DzboTcdH
 zaFimBiUqUPSzJzluQ8ZSO53GggXArs5h69RwIqfIA==
X-Google-Smtp-Source: ACHHUZ5dhRHbAXQeIaoZafDogNhW0B2TVMtD9Y4nZVr4zuuLwuZm6c53OVk2w+bmEvCs6WLLF+UnYouxLE30gtHLjII=
X-Received: by 2002:a17:902:db12:b0:1ac:6a6f:2dc2 with SMTP id
 m18-20020a170902db1200b001ac6a6f2dc2mr705plx.6.1684963382286; Wed, 24 May
 2023 14:23:02 -0700 (PDT)
MIME-Version: 1.0
References: <CAPVWWDXj+au=50v00jK7DNGFX33p7uyz_x+iQMGxk6Gu2p5saA@HIDDEN>
 <CAPVWWDVVA+pp6Yo4e=hDysii_0HL8pJQ+HzLXUPWNePxcdnQfQ@HIDDEN>
 <CALDnm51L=uL3nmh3Zj6AGh3pma9b7p5paJXVX7=2=DxUYDopRA@HIDDEN>
In-Reply-To: <CALDnm51L=uL3nmh3Zj6AGh3pma9b7p5paJXVX7=2=DxUYDopRA@HIDDEN>
From: Alan Donovan <adonovan@HIDDEN>
Date: Wed, 24 May 2023 17:22:48 -0400
Message-ID: <CAPVWWDUqoJWUEF9-2ziMiTtFdA_EqV07ME-uSjGv+GWp=cgO0Q@HIDDEN>
Subject: Re: bug#63651: possible eglot xref-find-references optimization
To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -8.0 (--------)
X-Debbugs-Envelope-To: 63651
Cc: 63651 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -9.0 (---------)

On Wed, 24 May 2023 at 12:29, Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> =
wrote:
> Thanks for reporting this Alan, it is an interesting point. (Next time yo=
u can add me on CC directly so that i don't miss the message in this list, =
which i don't always track closely)

Will do.

> Could you provide a test case where these ~=3D 1300 xref matches are prod=
uced? I suppose it is some Go repository? With a standard gopls? But which =
file/position and which command should one use?

$ git clone https://github.com/golang/tools
$ cd tools
$ (cd gopls && go install)   # if you don't have it already
$ emacs gopls/internal/lsp/cache/analysis.go
Then search for fmt.Sprintf (e.g. on L246) and do xref-find-references
on it. I get about 1300 matches.

cheers
alan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#63651; Package emacs. Full text available.

Message received at 63651 <at> debbugs.gnu.org:


Received: (at 63651) by debbugs.gnu.org; 24 May 2023 16:29:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 24 12:29:19 2023
Received: from localhost ([127.0.0.1]:44589 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q1rMV-000791-5G
	for submit <at> debbugs.gnu.org; Wed, 24 May 2023 12:29:19 -0400
Received: from mail-ot1-f52.google.com ([209.85.210.52]:56817)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1q1rMS-00078o-HB
 for 63651 <at> debbugs.gnu.org; Wed, 24 May 2023 12:29:18 -0400
Received: by mail-ot1-f52.google.com with SMTP id
 46e09a7af769-6af754a2f2cso388595a34.1
 for <63651 <at> debbugs.gnu.org>; Wed, 24 May 2023 09:29:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1684945750; x=1687537750;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=SZaRrfoDUiVvLm73W7fkqqOexVf4DnXY2Ate0tYBBcA=;
 b=Ge1ZkMyF3+fdHSEBSaa3pcYG0aVaVeKqbUZDEgWSm1rl60O06RjAKvgmq8R9HoYW3a
 4OFH1Fuz6dDHFzzJWJJbx8LA/v2M8I6d2k1FnjcI/JKAAo0uRNgbkfXnDgcgAxD974BI
 plSZBowr39rZQJSKCQ+GCiL94yF9Sku8WwsLukpO63ADLVWkR0Otn3a1IBWivRMN9wxR
 63l2A+Z/twJddWqaeEo2BrFGz/fu60QbPfoR1YID8h+H2xAEX3Z652BqcoIGhIi+wzrO
 0khM6JEU5ficvqO3evAsu8z7DVFFrxkrtMBciHbrZR0CsAQDYe1TyE/swCMAoteFVtH7
 /knw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1684945750; x=1687537750;
 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=SZaRrfoDUiVvLm73W7fkqqOexVf4DnXY2Ate0tYBBcA=;
 b=NvDfE+QjV/6hfa6DegyaNd/6SvfFCo+5meVrb6e9vZwpqIzSuVPVWrwVEh5mQ3GiGb
 NKj5sQYcZKc57fa3OzGzPsSgQ3bDlYvyUvl28NM8iPwlvHlGGiVSZ9pxDpyV5jRen1Ob
 +xkFtLwll+lXURYSR9qHHnr5rbRoonjsYf6+WhtwkGuMiTWqnk3jefWRRAjiFsv/S5FK
 EnzBWfc0pc+VJ+oc85G5u3oR+3SDWIBfYbqDol693tHEqilh3kzCQt6QLk2jd4mJvONW
 Rau37THZr9+POEu6Tu2oQ9HWgOGyChF+uKC9p/JUafpu/5zvus9UsV/VAAgrasHFlMt3
 p5Lg==
X-Gm-Message-State: AC+VfDxDWHQmhgOJrLxu8M4p+LpJG/S8XWlgroZdmM1eI9Hcb9bKYmDJ
 2cVMZtoPRTNYD5LBuUzCC41gT+KK6gwjQLPRAaM=
X-Google-Smtp-Source: ACHHUZ5HM2cQyn0swHpCPcmjGGDx4iU7bqOFJ2oD0pk91JN6RUjC4VsmbYoLUMtsExdWFDO1PoolhvZ9iLnq3bdcaGA=
X-Received: by 2002:a05:6871:302:b0:192:7111:d8c9 with SMTP id
 b2-20020a056871030200b001927111d8c9mr130588oag.42.1684945750618; Wed, 24 May
 2023 09:29:10 -0700 (PDT)
MIME-Version: 1.0
References: <CAPVWWDXj+au=50v00jK7DNGFX33p7uyz_x+iQMGxk6Gu2p5saA@HIDDEN>
 <CAPVWWDVVA+pp6Yo4e=hDysii_0HL8pJQ+HzLXUPWNePxcdnQfQ@HIDDEN>
In-Reply-To: <CAPVWWDVVA+pp6Yo4e=hDysii_0HL8pJQ+HzLXUPWNePxcdnQfQ@HIDDEN>
From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Date: Wed, 24 May 2023 17:28:58 +0100
Message-ID: <CALDnm51L=uL3nmh3Zj6AGh3pma9b7p5paJXVX7=2=DxUYDopRA@HIDDEN>
Subject: Re: bug#63651: possible eglot xref-find-references optimization
To: Alan Donovan <adonovan@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000ee784605fc730060"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63651
Cc: 63651 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000ee784605fc730060
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Thanks for reporting this Alan, it is an interesting point. (Next time you
can add me on CC directly so that i don't miss the message in this list,
which i don't always track closely)

Could you provide a test case where these ~=3D 1300 xref matches are
produced? I suppose it is some Go repository? With a standard gopls? But
which file/position and which command should one use?

Thanks,
Jo=C3=A3o

--000000000000ee784605fc730060
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div>Thanks for reporting this Alan, it is an interesting=
 point. (Next time you can add me on CC directly so that i don&#39;t miss t=
he message in this list, which i don&#39;t always track closely)</div><div =
dir=3D"auto"><br></div><div dir=3D"auto">Could you provide a test case wher=
e these ~=3D 1300 xref matches are produced? I suppose it is some Go reposi=
tory? With a standard gopls? But which file/position and which command shou=
ld one use?</div><div dir=3D"auto"><br></div><div dir=3D"auto">Thanks,</div=
><div dir=3D"auto">Jo=C3=A3o</div></div>

--000000000000ee784605fc730060--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#63651; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 May 2023 17:46:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 22 13:46:20 2023
Received: from localhost ([127.0.0.1]:36274 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q19bv-00032S-Ll
	for submit <at> debbugs.gnu.org; Mon, 22 May 2023 13:46:19 -0400
Received: from lists.gnu.org ([209.51.188.17]:48290)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <adonovan@HIDDEN>) id 1q19bu-00032J-9Q
 for submit <at> debbugs.gnu.org; Mon, 22 May 2023 13:46:18 -0400
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 <adonovan@HIDDEN>)
 id 1q19bq-000889-Ob
 for bug-gnu-emacs@HIDDEN; Mon, 22 May 2023 13:46:18 -0400
Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <adonovan@HIDDEN>)
 id 1q19bn-0004qM-EJ
 for bug-gnu-emacs@HIDDEN; Mon, 22 May 2023 13:46:14 -0400
Received: by mail-pl1-x62a.google.com with SMTP id
 d9443c01a7336-1a950b982d4so19355ad.0
 for <bug-gnu-emacs@HIDDEN>; Mon, 22 May 2023 10:46:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=google.com; s=20221208; t=1684777569; x=1687369569;
 h=content-transfer-encoding:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=5Dpb7M1LiaGky9QdgUbAwdz1knb6OtJISxxZ+etOS5g=;
 b=iNbB1YKeRW6aJ8xX4Tb++GQ0mKs90uvwohQIvWROxE4cILuEhy7Q7U8/kWO4b3NuMJ
 iRQra2dqvxrO4y3oIz6hlJLyokVjsum4wHSnABgLGkrwoOjGRTLXVoVRdlP0tek2ePBY
 ZCmrnYkLrevqAmrFEiF+VUZxwHgVXrm76kaDP+9W7VEvvHdepNKtj3+uGTLCeyapADox
 /BRRt8jrmGvVXHGX1yju4xBt6dnrYDVpKlpvvtWpeAQBQ7csP8ZCl1hxVB29YgQfOIwG
 Q3/YjALt/8hHo4L7l5uqQIn7LNSX7evnxDC4pMnxdWhT/QY+WYFoT2V/SuLOm9rEFC6j
 Zx6g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1684777569; x=1687369569;
 h=content-transfer-encoding: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=5Dpb7M1LiaGky9QdgUbAwdz1knb6OtJISxxZ+etOS5g=;
 b=cYcDruaRb3YDXIX3/31pJemSehtXNgL8Hw8LtLu0ZNhDeW1SxuZc+5Dsp41r/donZo
 QUsjx05PVbPLviyAiQt4HhLfyd+pstxIcZe8XGkbafWF9wYUvC4SHhUDpwHmp83V8DtF
 D7ZS0gBnjgjY2CQqpxnJcdF4p983T2PeuQUXPdM5LpK+Mk2fI+GEqE+IABE2OmfHol34
 EVIFZfiSYbMIlBiltu0VpdWZ0QrXQ9TqJ9N+2F1XSI4zASLBkX7ek35cKQIAs/n5R/MG
 JBdj+D1Oud/YicrTtkCMuaqhiKzp3PUVVJS00RKKwrOiHKoY9TIiPBVd9FYGQqHIINfc
 K9qA==
X-Gm-Message-State: AC+VfDzsL/IWFFAkI3H7EQ8zgCQMrus5Hnvg2IW8FDux1CV3MaC7ydHV
 JLa4QApnFDOohfkj1/qISvsBMgFPoxJh1xrmTQuJqyrOaIWe3eKv40siUA==
X-Google-Smtp-Source: ACHHUZ4ycpBZm25pdglo7n2kJOl6l+lKqKxGfLMlVaYQKlBfbryhgnuIYbjVtL9kZOybs9u3hVW+U1oceW68pj1dnAo=
X-Received: by 2002:a17:902:dac1:b0:19b:c61:2867 with SMTP id
 q1-20020a170902dac100b0019b0c612867mr434867plx.15.1684777568695; Mon, 22 May
 2023 10:46:08 -0700 (PDT)
MIME-Version: 1.0
References: <CAPVWWDXj+au=50v00jK7DNGFX33p7uyz_x+iQMGxk6Gu2p5saA@HIDDEN>
In-Reply-To: <CAPVWWDXj+au=50v00jK7DNGFX33p7uyz_x+iQMGxk6Gu2p5saA@HIDDEN>
From: Alan Donovan <adonovan@HIDDEN>
Date: Mon, 22 May 2023 13:45:57 -0400
Message-ID: <CAPVWWDVVA+pp6Yo4e=hDysii_0HL8pJQ+HzLXUPWNePxcdnQfQ@HIDDEN>
Subject: possible eglot xref-find-references optimization
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2607:f8b0:4864:20::62a;
 envelope-from=adonovan@HIDDEN; helo=mail-pl1-x62a.google.com
X-Spam_score_int: -175
X-Spam_score: -17.6
X-Spam_bar: -----------------
X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001,
 DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5,
 USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hi Jo=C3=A3o & other eglot folks,

I've been doing a small amount of digging into what makes VSCode so
relatively fast. One item that I noticed is that eglot, in the loop
that it does over the references obtained from the LSP server, calls
find-buffer-visiting to avoid re-reading files that are already open
in buffers. I'm not sure whether this is just an optimization, or
whether it is necessary to ensure that modified buffer contents are
rendered correctly, but it's noticeably slow: for one large query that
results in an xref buffer of 1300 lines, the operation takes about 2s
normally, but only about 0.8s when I replace the find-buffer-visiting
call with false. (According to the elisp CPU profiler,
find-buffer-visiting calls file-truename, recursively, a lot.)

(defun eglot--xref-make-match (name uri range)
  "Like `xref-make-match' but with LSP's NAME, URI and RANGE.
Try to visit the target file for a richer summary line."
  (pcase-let*
      ((file (eglot--uri-to-path uri))
       (visiting (or (find-buffer-visiting file) ;; <--- replace this with =
false
                     (gethash uri eglot--temp-location-buffers)))
       (collect (lambda ()
...

Would that change be sound? Or is it necessary for the reason I
guessed at (or some other reason)?

cheers
alan




Acknowledgement sent to Alan Donovan <adonovan@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#63651; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 11 Sep 2023 23:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.