summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/init.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/emacs/init.el b/emacs/init.el
index e6e03bb..2e38ee6 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -7,17 +7,17 @@
(add-to-list 'load-path (expand-file-name (concat user-emacs-directory "site-lisp")))
-;; I like to see garbage collection messages. I keep meaning to set up something like the [[https://akrl.sdf.org/#orgc9536b4][garbage collector magic hack]] so that emacs hangs less when i'm running a macro or opening a big web page or whatever. But for now, the default values are adequate.
-(setq garbage-collection-messages t)
-
-;; We set the ~gc-cons-threshold~ and ~gc-cons-percentage~ to be really high in the ~early-init.el~ file. This makes loading emacs a little bit faster. But obviously i don't want that in general usage, so once emacs has finished starting up, i make sure to lower the values again.
+;; Give me stats on garbage collection and startup time
+(setopt garbage-collection-messages t)
(add-hook 'emacs-startup-hook
#'(lambda ()
- (message (format "Initialised in %s seconds with %s garbage collections." (emacs-init-time) gcs-done))
- ;;; reset garbage collector
- (setq
- gc-cons-threshold 800000
- gc-cons-percentage 0.2)))
+ (message (format "Initialised in %s seconds with %s garbage collections." (emacs-init-time) gcs-done))))
+
+;; Use the gcmh to collect garbage when i'm not using emacs
+(use-package gcmh
+ :ensure t
+ :custom
+ (gcmh-mode t))
(setopt user-full-name "noa")
(setopt user-mail-address "noa@noa.pub")