GNU bug report logs -
#47711
27.1; Deferred highlighting support in `completion-all-completions', `vertico--all-completions`
Previous Next
Reported by: Daniel Mendler <mail <at> daniel-mendler.de>
Date: Sun, 11 Apr 2021 20:52:01 UTC
Severity: normal
Found in version 27.1
Done: Daniel Mendler <mail <at> daniel-mendler.de>
Bug is archived. No further changes may be made.
Full log
Message #410 received at 47711 <at> debbugs.gnu.org (full text, mbox):
On 08/11/2023 03:24, João Távora wrote:
> On Wed, Nov 8, 2023 at 1:06 AM Dmitry Gutov <dmitry <at> gutov.dev> wrote:
>>
>> On 07/11/2023 14:13, João Távora wrote:
>>> Any objections? Seems to speed it up when flex is the preferred
>>> completion style outside icomplete. These are average times
>>> collected from the instrumentation of the above
>>> completion-all-completions when doing a M-: (setq i TAB)
>>>
>>> I just used my normal Emacs session for this.
>>>
>>> with lazy hilit: 0.104536125
>>> without lazy hilit: 0.172522571
>>
>> IIUC the problem with the default completion-at-point UI here is that is
>> prints all completions anyway, in the buffer *Completions*. And so it
>> applies syntax highlighting to them as well, and does that eagerly (as
>> opposed to e.g. doing that via jit-lock).
>>
>> If you instrumented only the 'completion-all-completions' call, then
>> that might miss the subsequent time spent in sorting.
>
> You probably mean highlighting: that's the saving being made here,
> not sorting.
I meant both but I forgot that we moved scoring to later in both cases.
> Anyway, it _felt_ snappier, but maybe I was dreaming. Got any
> better suggestions for places where to place `benchmark-progn`?
Perhaps around the whole minibuffer-completion-help.
> Also, I don't think *Completions* has _every_ matching completion,
> does it? Doesn't it display more completions as you keep TABing?
> That's what I supposed was providing the speedup.
Well, I type (d, press C-M-i, then select the window showing
*Completions* and scroll to the end of the buffer. The last completion
displayed there starts with "dy", so that's probably all of them.
That's with the default completion-styles config, but with flex it's the
same: all completions shown in the buffer. Sorted and highlighted.
This bug report was last modified 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.