Speed up bin/doom by staving off GC
This effectively halves the runtime of 'doom sync' and 'doom doctor', and shaves 5-10% off other commands.
This commit is contained in:
parent
7ed96590e6
commit
ba817cb1ff
1 changed files with 5 additions and 0 deletions
5
bin/doom
5
bin/doom
|
@ -11,6 +11,11 @@
|
||||||
:; [ -x "$_DOOMPOST" ] && PATH="$_DOOMBASE/bin:$PATH" "$_DOOMPOST" "$0" "$@"
|
:; [ -x "$_DOOMPOST" ] && PATH="$_DOOMBASE/bin:$PATH" "$_DOOMPOST" "$0" "$@"
|
||||||
:; exit $CODE
|
:; exit $CODE
|
||||||
|
|
||||||
|
;; CLI ops tend to eat a lot of memory. To speed it up, stave off the GC, but
|
||||||
|
;; not to `most-positive-fixnum' like we do in init.el; that's too high -- we
|
||||||
|
;; don't want to intentionally leak memory.
|
||||||
|
(setq gc-cons-threshold 134217728) ; 128mb
|
||||||
|
|
||||||
(let* ((loaddir (file-name-directory (file-truename load-file-name)))
|
(let* ((loaddir (file-name-directory (file-truename load-file-name)))
|
||||||
(emacsdir (getenv "EMACSDIR"))
|
(emacsdir (getenv "EMACSDIR"))
|
||||||
(user-emacs-directory
|
(user-emacs-directory
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue