purcell / emacs.d

An Emacs configuration bundle with batteries included
BSD 2-Clause "Simplified" License
6.84k stars 2.05k forks source link

Consult live preview has performance issue for some commands #779

Closed Eason0210 closed 3 years ago

Eason0210 commented 3 years ago

Hi @purcell ,

when using consult-buffer(C-x, b), it very slow when the candidate is a recent file, especially serious when the file is an org file.

So, there is an official recommendation to fixed this, to leave automatic immediate previews enabled in general and disable the automatic preview only for commands, where the preview may be expensive due to file loading.

(consult-customize
       consult-ripgrep consult-git-grep consult-grep
       consult-bookmark consult-recent-file consult-xref
       consult--source-file consult--source-project-file consult--source-bookmark
       :preview-key (kbd "M-P"))

I tested it on Mac OS and Windows 10, and it is very smooth when disable these commands.

By the way, consult-config has been deprecated in favor of consult-customize in consult version 0.7.

purcell commented 3 years ago

Thanks, done