performance issue with long list #433
-
I have list with around 500k records. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
500k is at least one magnitude too much. Vertico is supposed to handle up to 50k candidates well in it's default configuration. We cannot do much better due to technical limitations of the underlying APIs. There are two possibilities to handle such a large amount of candidates, via using a custom completion style, but these approaches will also hit limitations.
For option 2 see this code: (defun +orderless-limited-all-completions (string table pred point)
;; Refuse to compute candidates if input is too short
(and (length> string 2)
(or (orderless-all-completions string table pred point)
;; Fallback to prefix completion to support dynamic completion tables
(completion-emacs21-all-completions string table pred point))))
(defun +orderless-limited-try-completion (string table pred point)
;; Refuse to compute candidates if input is too short
(and (length< string 2)
(or (orderless-try-completion string table pred point)
;; Fallback to prefix completion to support dynamic completion tables
(completion-emacs21-try-completion string table pred point))))
(add-to-list 'completion-styles-alist
'(+orderless-limited
+orderless-limited-try-completion
+orderless-limited-all-completions
"Limited orderless completion style."))
(setq completion-styles '(+orderless-limited)
completion-category-defaults nil
completion-category-overrides nil) See also the discussion at doomemacs/doomemacs#6622 (comment). |
Beta Was this translation helpful? Give feedback.
500k is at least one magnitude too much. Vertico is supposed to handle up to 50k candidates well in it's default configuration. We cannot do much better due to technical limitations of the underlying APIs.
There are two possibilities to handle such a large amount of candidates, via using a custom completion style, but these approaches will also hit limitations.
For option 2 see this code: