GNU bug report logs - #61726
[PATCH] Eglot: Support positionEncoding capability

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Thu, 23 Feb 2023 08:06:01 UTC

Severity: normal

Tags: patch

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #200 received at 61726 <at> debbugs.gnu.org (full text, mbox):

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: João Távora <joaotavora <at> gmail.com>
Cc: 61726 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#61726: [PATCH] Eglot: Support positionEncoding capability
Date: Sat, 25 Feb 2023 23:34:02 +0100
On Sat, 25 Feb 2023 at 22:13, João Távora wrote:

> In eglot-move-to-lsp-abiding-column (the utf-16 sibling of this
> function) we use a binary search instead of a linear search.  I remember
> measuring a visible improvement.  I'm not sure the conditions are
> exactly the same with this one.  Could/should we do the same here?

Funnily, in the quick tests I made, Eli's function seems twice as fast
as "lsp-abiding".

Specifically, I ran the following (for each of the 3 move-to functions)
on a buffer where the first line is about 100 characters long:

(benchmark-run-compiled 10000
    (progn
      (goto-char (point-min))
      (let ((len (- (pos-eol) (point))))
        (dotimes (i len)
          (eglot-move-to-column (mod i len))))))




This bug report was last modified 2 years and 138 days ago.

Previous Next


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