From 35fac3eff988d90a3f7669f83f784046f5dac5ca Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Sun, 20 Nov 2022 16:59:50 +0000 Subject: [PATCH] perf: relax garbage collection at start of init Garbage collection is now relaxed at startup, decreasing startup time by around ~0.75 seconds. Deleted lisp/performance.el as no longer needed. --- init.el | 4 +++- lisp/performance.el | 12 ------------ 2 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 lisp/performance.el diff --git a/init.el b/init.el index 30d5892..c379061 100644 --- a/init.el +++ b/init.el @@ -7,6 +7,9 @@ ;; ;;; Code: +;; Increase the threshold - performance +(setq gc-cons-threshold (* 50 1000 1000)) + ;; Disable Emacs' GTK decorations. Done in this file otherwise done too late. (tool-bar-mode -1) (scroll-bar-mode -1) @@ -47,7 +50,6 @@ (load "editor") (load "org-mode") (load "keybinds") -(load "performance") (load "languages") ;; Load user configuration diff --git a/lisp/performance.el b/lisp/performance.el deleted file mode 100644 index cf08513..0000000 --- a/lisp/performance.el +++ /dev/null @@ -1,12 +0,0 @@ -;;; lisp/performance.el --- Performance improvements for Emacs -*- lexical-binding: t; -*- -;;; Commentary: -;; -;; Emacs is widely known to be one of the slower editors - despite the -;; great 'native compilation' or the daemon-client relationship. So that needs to change too. -;; -;;; Code: - -;; Increase the threshold -(setq gc-cons-threshold (* 50 1000 1000)) - -;;; performance.el ends here