diff options
| author | Spencer Baugh | 2025-02-16 20:16:19 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2025-03-21 17:06:19 -0400 |
| commit | b12a3a03ae134ab710170b43262fe8db13364727 (patch) | |
| tree | fb81f656d8346b1f3455119a7bb4f72309e9a31a /java/incrementing-version-code | |
| parent | df6669578001e49f44714301df71870654a2de33 (diff) | |
| download | emacs-b12a3a03ae134ab710170b43262fe8db13364727.tar.gz emacs-b12a3a03ae134ab710170b43262fe8db13364727.zip | |
Lazily highlight and insert candidates in *Completions*
From profiling, the main bottleneck in completion over large
completion sets is display-completion-list, when there are many
available candidates. For example, in my large monorepo, when
completing over the 589196 files or the 73897 branches, even
with the candidates narrowed down by typing some prefix to
complete, TAB (when it shows *Completions*) or ? is slow, mostly
in display-completion-list.
However, rendering all the completion candidates is unnecessary if
the *Completions* window is never scrolled to see those candiates. By
eagerly inserting only some candidates and lazily highlighting and
inserting the remaining candidates only when necessary, performance is
much improved.
* lisp/minibuffer.el (completion--insert-strings): Insert
completions lazily. (bug#74561)
(completions--lazy-insert-button): Add.
(completion--insert-horizontal, completion--insert-one-column):
Throw a continuation when enough lines of completions are
inserted.
(completion--insert-vertical): Add ignored lines argument.
(minibuffer-completion-help): Set completion-lazy-hilit.
(with-minibuffer-completions-window): Call
completion--lazy-insert-strings.
(with-minibuffer-completions-window):
* lisp/simple.el (completion-setup-function): Preserve
buffer-locals required for lazy completion insertion.
(switch-to-completions): Call completion--lazy-insert-strings.
* etc/NEWS: Announce.
Diffstat (limited to 'java/incrementing-version-code')
0 files changed, 0 insertions, 0 deletions