From 0e9c5bba140264efb1cbdb79ccf04c647e834d55 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Wed, 17 May 2023 23:51:11 -0400 Subject: Add the Garbage Collector Magic Hack --- early-init.el | 13 +++++++++++++ init.el | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/early-init.el b/early-init.el index f53a8bc..f183fcc 100644 --- a/early-init.el +++ b/early-init.el @@ -6,6 +6,19 @@ ;; absolutely must be in Early Init. +;; --------------------------------------------------------------------- +;;; Performance hacks +;; ------------------ +;; These hacks subjectively make Emacs perform "better" +;; --------------------------------------------------------------------- + +;; Defer garbage collection until later in the startup process +(setq gc-cons-threshold most-positive-fixnum + gc-cons-percentage 0.6) + + + + ;; --------------------------------------------------------------------- ;;; UI Adjustments ;; --------------- diff --git a/init.el b/init.el index 209a9a4..74e9d8a 100644 --- a/init.el +++ b/init.el @@ -58,6 +58,25 @@ +;; --------------------------------------------------------------------- +;; Performance hacks +;; ----------------- +;; These hacks subjectively make Emacs perform "better" +;; --------------------------------------------------------------------- + +;; Garbage Collector Magic Hack +(use-package gcmh + :straight t + :defer t + :init + (setq gcmh-idle-delay 15 + gcmh-idle-delay-factor 10 + gcmh-high-cons-threshold (* 16 (* 1024 1024))) ;16mb + :hook (after-init-hook . gcmh-mode)) + + + + ;; --------------------------------------------------------------------- ;;; Graphical Environment ;; ---------------------- -- cgit v1.2.3