From f88496cf588475b6514c394739f54381d22d61d5 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Fri, 19 Mar 2021 12:13:43 -0400 Subject: [PATCH] Add gcmh and move gc config to early-init.el --- emacs/.emacs.d/early-init.el | 5 +++++ emacs/.emacs.d/init.el | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 emacs/.emacs.d/early-init.el diff --git a/emacs/.emacs.d/early-init.el b/emacs/.emacs.d/early-init.el new file mode 100644 index 0000000..489252b --- /dev/null +++ b/emacs/.emacs.d/early-init.el @@ -0,0 +1,5 @@ +;; -*- lexical-binding: t; -*- + +;; Some startup time optimizations stolen from Doom emacs +(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes + gc-cons-percentage 0.6) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 97eea5d..6d7e4c0 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -1,8 +1,6 @@ ;; -*- lexical-binding: t; -*- ;; Some startup time optimizations stolen from Doom emacs -(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes - gc-cons-percentage 0.6) (defvar file-name-handler-alist-backup file-name-handler-alist) (setq file-name-handler-alist nil) (add-hook 'emacs-startup-hook @@ -37,6 +35,12 @@ (straight-use-package 'use-package) (setq straight-use-package-by-default t) +;; "Garbage Collection Magic Hack" +(use-package gcmh + :demand t + :config + (gcmh-mode 1)) + ;; Fix $PATH (use-package exec-path-from-shell :hook (after-init . exec-path-from-shell-initialize)