perf: pgtk-wait-for-event-timeout = 0.001

Thise should reduce the artificial latency added to window manager
operations (like calls to some of Emacs' frame API, e.g.
make-frame-invisible) on the PGTK build of Emacs. This should mitigate
latency issues with childframes in general and packages that use them,
e.g. lsp-ui and company-box.

There's also a small chance 0.001 is much too low, and may cause
artefacting on especially slow hardware. More testing is needed.
This commit is contained in:
Henrik Lissner 2021-09-29 13:59:11 +02:00
parent 3179c2a744
commit 731ae806ea

View file

@ -306,6 +306,13 @@ config.el instead."
;; memory usage, however! ;; memory usage, however!
(setq inhibit-compacting-font-caches t) (setq inhibit-compacting-font-caches t)
;; PGTK builds only: this timeout adds latency to frame operations, like
;; `make-frame-invisible', which are frequently called without a guard because
;; it's inexpensive in non-PGTK builds. Lowering the timeout from the default
;; 0.1 should make childframes and packages that manipulate them (like `lsp-ui',
;; `company-box', and `posframe') feel much snappier. See emacs-lsp/lsp-ui#613.
(setq pgtk-wait-for-event-timeout 0.001)
;; Increase how much is read from processes in a single chunk (default is 4kb). ;; Increase how much is read from processes in a single chunk (default is 4kb).
;; This is further increased elsewhere, where needed (like our LSP module). ;; This is further increased elsewhere, where needed (like our LSP module).
(setq read-process-output-max (* 64 1024)) ; 64kb (setq read-process-output-max (* 64 1024)) ; 64kb