Do other things with the garbage collector, do they work?
This commit is contained in:
parent
5e795aef6d
commit
1d393de506
@ -5,7 +5,19 @@
|
|||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(setq gc-cons-threshold (* 8 5000 5000))
|
;; blame @chke@emacs.ch if this no worky
|
||||||
|
(defvar mir/default-gc-thresh gc-cons-threshold)
|
||||||
|
(defun max-gc-thresh ()
|
||||||
|
(setq gc-cons-threshold most-positive-fixnum))
|
||||||
|
(max-gc-thresh)
|
||||||
|
(defun restore-gc-thresh ()
|
||||||
|
(setq gc-cons-threshold mir/default-gc-thresh))
|
||||||
|
(add-hook 'minibuffer-setup-hook #'max-gc-thresh)
|
||||||
|
(add-hook 'minibuffer-exit-hook #'restore-gc-thresh)
|
||||||
|
(add-hook 'elpaca-after-init-hook #'restore-gc-thresh)
|
||||||
|
(setq gc-cons-percentage 0.5)
|
||||||
|
(run-with-idle-timer 5 t #'garbage-collect)
|
||||||
|
(setq garbage-collection-messages t)
|
||||||
|
|
||||||
(defun display-startup-echo-area-message ()
|
(defun display-startup-echo-area-message ()
|
||||||
"A re-definition of the function.
|
"A re-definition of the function.
|
||||||
@ -22,9 +34,6 @@ instead of the banal
|
|||||||
|
|
||||||
"))
|
"))
|
||||||
|
|
||||||
;; Crash the computer by overloading memory
|
|
||||||
(setq gc-cons-threshold (* 50 1000 1000))
|
|
||||||
|
|
||||||
;; Disable package.el so we can use straight
|
;; Disable package.el so we can use straight
|
||||||
(setq package-enable-at-startup nil)
|
(setq package-enable-at-startup nil)
|
||||||
(defvar use-package-verbose nil)
|
(defvar use-package-verbose nil)
|
||||||
|
6
init.el
6
init.el
@ -306,7 +306,7 @@ If the current window occupies the whole frame, split it."
|
|||||||
|
|
||||||
(elpaca compat)
|
(elpaca compat)
|
||||||
(elpaca marginalia (marginalia-mode))
|
(elpaca marginalia (marginalia-mode))
|
||||||
(elpaca gcmh (gcmh-mode))
|
;; (elpaca gcmh (gcmh-mode))
|
||||||
(elpaca page-break-lines
|
(elpaca page-break-lines
|
||||||
(add-hook 'emacs-lisp-mode-hook #'page-break-lines-mode))
|
(add-hook 'emacs-lisp-mode-hook #'page-break-lines-mode))
|
||||||
(elpaca rainbow-mode
|
(elpaca rainbow-mode
|
||||||
@ -331,8 +331,4 @@ If the current window occupies the whole frame, split it."
|
|||||||
;; Don't barf out emacs errors as they are encountered
|
;; Don't barf out emacs errors as they are encountered
|
||||||
(setq debug-on-error nil)
|
(setq debug-on-error nil)
|
||||||
|
|
||||||
;; lower gc threshold again
|
|
||||||
(setq gc-cons-threshold (* 2 100 1000))
|
|
||||||
;; (add-function :before #'after-focus-change-function #'garbage-collect)
|
|
||||||
|
|
||||||
;;; init.el ends here
|
;;; init.el ends here
|
||||||
|
Loading…
Reference in New Issue
Block a user