dotfiles/emacs-lisp/performance.org
magic_rb 9ee6c651be
Move performance optimizations into their own file
Signed-off-by: magic_rb <magic_rb@redalder.org>
2024-07-24 21:30:09 +02:00

1 KiB

Performance

Increase the amount of data Emacs reads from a process in one go, default is 4KB, but some LSP servers produce responses up to 24MB.

  (when (boundp 'read-process-output-max)
    (setq ; process-adaptive-read-buffering nil
          read-process-output-max (* 24 1024 1024)))

Increase GC threshold to avoid random freezes on garbage collection.

  (setq gc-cons-threshold (* 1024 1024 256))

Set the minimum delay between LSP refreshes, should help with performance when typing really fast.

  (setq lsp-idle-delay 0.250)

Skip fontification on input, mostly helps with scrolling when Emacs cannot keep up withe fontification.

  (setq redisplay-skip-fontification-on-input t)