From ba817cb1ff4d16958a70cc0e0c71d4f381822f6a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 27 May 2020 02:55:14 -0400 Subject: [PATCH] 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. --- bin/doom | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/doom b/bin/doom index c869160d7..bf17b439c 100755 --- a/bin/doom +++ b/bin/doom @@ -11,6 +11,11 @@ :; [ -x "$_DOOMPOST" ] && PATH="$_DOOMBASE/bin:$PATH" "$_DOOMPOST" "$0" "$@" :; 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))) (emacsdir (getenv "EMACSDIR")) (user-emacs-directory