This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar my/enable-forgiving-gc t "Toggle forgiving gc logic.") | |
;; set a very large gc-cons-threshold (1GB) so we don't garbage | |
;; collect when I'm interacting with emacs ... BUT we also want | |
;; to prevent filling up to a large garbage pile when idle for | |
;; a long period of time (e.g. overnight), so we reschedule for | |
;; an interval seconds of idle time ... this way we should prevent | |
;; both gc when typing but also prevent gc-cons-threshold from | |
;; actually being reached and potentially triggering a very long gc | |
;; note: this handy if you want to run fancy modelines and other | |
;; things that aren't necessarily super memory efficient but either |