Configure garbage collection
This commit is contained in:
parent
54517cc4b9
commit
7f94876b44
24
init.el
24
init.el
@ -6,3 +6,27 @@
|
||||
;; URL: https://gitlab.wojciechkozlowski.eu/config/emacs.d
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
;; ----------------------------------------------------------------------------
|
||||
;; Run init without garbage collection.
|
||||
;; ----------------------------------------------------------------------------
|
||||
|
||||
(let ((gc-cons-threshold most-positive-fixnum))
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; Configure garbage collection.
|
||||
;;
|
||||
;; Based on advice from:
|
||||
;; http://bling.github.io/blog/2016/01/18/why-are-you-changing-gc-cons-threshold/
|
||||
;; --------------------------------------------------------------------------
|
||||
|
||||
(defun my-minibuffer-setup-hook ()
|
||||
(setq gc-cons-threshold most-positive-fixnum))
|
||||
|
||||
(defun my-minibuffer-exit-hook ()
|
||||
(setq gc-cons-threshold 800000))
|
||||
|
||||
(add-hook 'minibuffer-setup-hook #'my-minibuffer-setup-hook)
|
||||
(add-hook 'minibuffer-exit-hook #'my-minibuffer-exit-hook)
|
||||
|
||||
) ;; ((gc-cons-threshold most-positive-fixnum))
|
||||
|
Reference in New Issue
Block a user