mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: make emacs gc less annoying
This commit is contained in:
parent
699709c1d6
commit
f85d3dd18e
2 changed files with 17 additions and 13 deletions
|
|
@ -10495,8 +10495,11 @@ When Emacs compiles stuff, it often shows a bunch of warnings that I do not need
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: h:1667913c-2272-4010-bf3a-356455b97c83
|
:CUSTOM_ID: h:1667913c-2272-4010-bf3a-356455b97c83
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
|
This sets up automatic garbage collection when the frame is unused.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq garbage-collection-messages t)
|
(setq garbage-collection-messages nil)
|
||||||
(defmacro k-time (&rest body)
|
(defmacro k-time (&rest body)
|
||||||
"Measure and return the time it takes evaluating BODY."
|
"Measure and return the time it takes evaluating BODY."
|
||||||
`(let ((time (current-time)))
|
`(let ((time (current-time)))
|
||||||
|
|
@ -10508,8 +10511,9 @@ When Emacs compiles stuff, it often shows a bunch of warnings that I do not need
|
||||||
(defvar k-gc-timer
|
(defvar k-gc-timer
|
||||||
(run-with-idle-timer 15 t
|
(run-with-idle-timer 15 t
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(message "Garbage Collector has run for %.06fsec"
|
;; (message "Garbage Collector has run for %.06fsec"
|
||||||
(k-time (garbage-collect))))))
|
(k-time (garbage-collect)))))
|
||||||
|
;; )
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Indentation
|
*** Indentation
|
||||||
|
|
|
||||||
|
|
@ -541,7 +541,7 @@ create a new one."
|
||||||
(setq native-comp-async-report-warnings-errors 'silent) ; Emacs 28 with native compilation
|
(setq native-comp-async-report-warnings-errors 'silent) ; Emacs 28 with native compilation
|
||||||
(setq native-compile-prune-cache t)) ; Emacs 29
|
(setq native-compile-prune-cache t)) ; Emacs 29
|
||||||
|
|
||||||
(setq garbage-collection-messages t)
|
(setq garbage-collection-messages nil)
|
||||||
(defmacro k-time (&rest body)
|
(defmacro k-time (&rest body)
|
||||||
"Measure and return the time it takes evaluating BODY."
|
"Measure and return the time it takes evaluating BODY."
|
||||||
`(let ((time (current-time)))
|
`(let ((time (current-time)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue