summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2020-02-27 12:20:20 +0100
committerAlan Pearce2020-02-27 12:20:49 +0100
commitc06201a3cbe2f17669d37292a63ea532e4402b51 (patch)
treebf9e508032edb954962698977fc02b668ae19b85
parente2c59a95f621160ddc8196d4887797ce1e9b915f (diff)
downloadnixfiles-c06201a3cbe2f17669d37292a63ea532e4402b51.tar.lz
nixfiles-c06201a3cbe2f17669d37292a63ea532e4402b51.tar.zst
nixfiles-c06201a3cbe2f17669d37292a63ea532e4402b51.zip
Emacs: optimise startup and GC
-rw-r--r--user/emacs/.emacs.d/init.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/user/emacs/.emacs.d/init.el b/user/emacs/.emacs.d/init.el
index 9818194f..7b85bb9b 100644
--- a/user/emacs/.emacs.d/init.el
+++ b/user/emacs/.emacs.d/init.el
@@ -1,4 +1,4 @@
-;;; init --- user init file
+;;; init --- user init file  -*- lexical-binding: t; -*-
 (setq inhibit-startup-echo-area-message "alan")
 (setq inhibit-startup-screen t
       initial-scratch-message ""
@@ -7,6 +7,12 @@
       evil-want-keybinding nil
       frame-inhibit-implied-resize t)
 
+(setq gc-cons-threshold most-positive-fixnum
+      gc-cons-percentage 0.6)
+(add-hook 'emacs-startup-hook (lambda ()
+                                (setq gc-cons-threshold (* 16 1024 1024)
+                                      gc-cons-percentage 0.1)))
+
 (package-initialize)
 
 (defun reload-user-init-file ()