perf: run GC a little less aggressively
The delay will not be adjusted on a per-GC basis, depending on its last run-time. This should average to around 2-3s, which should be a good compromise between GCing too often and too infrequently.
This commit is contained in:
parent
68d8364aea
commit
6bd9c7c880
1 changed files with 6 additions and 4 deletions
10
core/core.el
10
core/core.el
|
@ -310,10 +310,12 @@ config.el instead."
|
||||||
|
|
||||||
;; The GC introduces annoying pauses and stuttering into our Emacs experience,
|
;; The GC introduces annoying pauses and stuttering into our Emacs experience,
|
||||||
;; so we use `gcmh' to stave off the GC while we're using Emacs, and provoke it
|
;; so we use `gcmh' to stave off the GC while we're using Emacs, and provoke it
|
||||||
;; when it's idle.
|
;; when it's idle. However, if the idle delay is too long, we run the risk of
|
||||||
(setq gcmh-idle-delay 0.5 ; default is 15s
|
;; runaway memory usage in busy sessions. If it's too low, then we may as well
|
||||||
gcmh-high-cons-threshold (* 16 1024 1024) ; 16mb
|
;; not be using gcmh at all.
|
||||||
gcmh-verbose doom-debug-p)
|
(setq gcmh-idle-delay 'auto ; default is 15s
|
||||||
|
gcmh-auto-idle-delay-factor 10
|
||||||
|
gcmh-high-cons-threshold (* 16 1024 1024)) ; 16mb
|
||||||
|
|
||||||
;; Emacs "updates" its ui more often than it needs to, so slow it down slightly
|
;; Emacs "updates" its ui more often than it needs to, so slow it down slightly
|
||||||
(setq idle-update-delay 1.0) ; default is 0.5
|
(setq idle-update-delay 1.0) ; default is 0.5
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue