Emacs: optimise file loading at startup
Alan Pearce alan@alanpearce.eu
Mon, 02 Mar 2020 15:45:13 +0100
1 files changed, 5 insertions(+), 2 deletions(-)
jump to
M user/emacs/.emacs.d/init.el → user/emacs/.emacs.d/init.el
@@ -7,11 +7,14 @@ package-enable-at-startup nil evil-want-keybinding nil frame-inhibit-implied-resize t) -(let ((default-gc-cons-threshold (* 16 1024 1024))) +(let ((default-gc-cons-threshold (* 16 1024 1024)) + (default-file-name-handler-alist file-name-handler-alist)) (setq gc-cons-threshold most-positive-fixnum - gc-cons-percentage 0.6) + gc-cons-percentage 0.6 + file-name-handler-alist nil) (add-hook 'minibuffer-setup-hook (lambda () (setq gc-cons-threshold most-positive-fixnum))) (add-hook 'minibuffer-exit-hook (lambda () (setq gc-cons-threshold default-gc-cons-threshold))) + (add-hook 'emacs-startup-hook (lambda () (setq file-name-handler-alist default-file-name-handler-alist))) (add-hook 'after-init-hook (lambda () (setq gc-cons-threshold default-gc-cons-threshold gc-cons-percentage 0.1))))