From 341a2b0ee7e47ae6d0ce06aedc22b6bc4d3ab785 Mon Sep 17 00:00:00 2001 From: Maciej Szlosarczyk Date: Mon, 31 Aug 2020 14:56:31 +0300 Subject: [PATCH] Update GC for faster startup time --- 01base.el | 3 --- init.el | 9 ++++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/01base.el b/01base.el index 75dc6f5..e48b8c8 100644 --- a/01base.el +++ b/01base.el @@ -10,9 +10,6 @@ ;;; Code: -;;;;;;;;; GC configuration ;;;;;;;;;;;;;;;;;;; -(setq gc-cons-threshold 50000000) - ;;;;;;;; Other optimizations ;;;;;;;;;;;;;;;;; ;;;;;;;; Stolen from Doom Emacs. ;;;;;;;;;;;;; diff --git a/init.el b/init.el index 6200f06..d979eda 100644 --- a/init.el +++ b/init.el @@ -2,6 +2,10 @@ ;;; Commentary: ;;; Code: ;; list the repositories containing them + +;; Set GC at 300 MB for startup +(setq gc-cons-threshold 300000000) + (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") ("melpa" . "https://melpa.org/packages/"))) @@ -13,7 +17,7 @@ ;; install use-package, the workhorse of configuration (unless (package-installed-p 'use-package) - (package-install 'use-package)) + (package-install 'use-package)) (require 'use-package) @@ -73,5 +77,8 @@ '(font-lock-type-face ((t (:foreground "#ffcb6b" :family "IBM Plex Mono")))) '(markdown-code-face ((t (:inherit fixed-pitch :family "IBM Plex Mono"))))) +;; Restore GC to normal, but still high +(setq gc-cons-threshold 100000000) + (provide 'init) ;;; init.el ends here