;; ------ solve the problem of Emacs GC footprint ------;; (setq gc-cons-threshold 100000000) ;; ------ GC optimization scheme from Purcell ------ (let ((normal-gc-cons-threshold (* 20 1024 1024)) (init-gc-cons-threshold (* 128 1024)  1024))) (setq gc-cons-threshold init-gc-cons-threshold) (add-hook 'emacs-startup-hook (lambda () (setq gc-cons-threshold normal-gc-cons-threshold))))Copy the code