Emacs: optimise startup and GC
Alan Pearce alan@alanpearce.eu
Thu, 27 Feb 2020 12:20:20 +0100
1 files changed, 7 insertions(+), 1 deletions(-)
jump to
M user/emacs/.emacs.d/init.el → 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 "" @@ -6,6 +6,12 @@ initial-major-mode 'fundamental-mode package-enable-at-startup nil 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)