aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs/init.el
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-10-16 08:41:17 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-10-16 08:41:17 +0100
commitaf191e7de838c9ad5e78378da5cc5f75df85c129 (patch)
tree00f26f09e6c984447a2bc2f529f0243ebdb0db8d /Emacs/.config/emacs/init.el
parent3145c66a48359c4ec90c17c3ef6b125437404410 (diff)
downloaddotfiles-af191e7de838c9ad5e78378da5cc5f75df85c129.tar.gz
dotfiles-af191e7de838c9ad5e78378da5cc5f75df85c129.tar.bz2
dotfiles-af191e7de838c9ad5e78378da5cc5f75df85c129.zip
(Emacs/config|init)~heavily optimised startup time
Used esup to figure out some points of pain, then fixed them. Also set gc-cons-threshold at start of init.el really high, then reset after finished loading.
Diffstat (limited to 'Emacs/.config/emacs/init.el')
-rw-r--r--Emacs/.config/emacs/init.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/Emacs/.config/emacs/init.el b/Emacs/.config/emacs/init.el
index 6011df4..e182c69 100644
--- a/Emacs/.config/emacs/init.el
+++ b/Emacs/.config/emacs/init.el
@@ -22,6 +22,11 @@
;; Sets up straight, use package and the literate system.
;;; Code:
+;; Before doing anything else, make gc-cons-threshold ridiculously
+;; high. This makes it so we have as few pauses during init as
+;; possible.
+(setq gc-cons-threshold (* 1024 1024 1024)) ; ~1GiB
+
;; Straight
(defvar bootstrap-version)
(let ((bootstrap-file
@@ -36,7 +41,6 @@
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
-
(setq straight-disable-native-compile nil
straight-use-package-by-default t
use-package-enable-imenu-support t
@@ -76,8 +80,12 @@
(require 'org)
(require 'eglot))
-(setq gc-cons-threshold 104857600 ; ~100MiB
- read-process-output-max 5242880) ; ~5MiB
+(setq gc-cons-threshold (* 100 1024 1024) ; ~100MiB
+ read-process-output-max 5242880 ; ~5MiB
+ ;; FIXME: Problem with memory-report after running Emacs for a
+ ;; bit, causes a Lisp nesting error, so I just set it up really
+ ;; high so it doesn't reach that.
+ max-lisp-eval-depth 5000)
(provide 'init)
;;; init.el ends here