Run emacs garbage collection when idle.
This is to hopefully avoid running garbage collection while I am actively interacting with emacs, which should theoretically result in a smoother experience.
This commit is contained in:
parent
574a2d0ce7
commit
ed7d4ab4e6
@ -1,6 +1,6 @@
|
|||||||
(setq gc-cons-threshold 100000000) ;; Increase garbage collection threshold for performance (default 800000)
|
(setq gc-cons-threshold (* 128 1024 1024)) ;; Increase garbage collection threshold for performance (default 800000)
|
||||||
;; Increase amount of data read from processes, default 4k
|
;; Increase amount of data read from processes, default 4k
|
||||||
(when (>= emacs-major-version 27)
|
(when (version<= "27.0" emacs-version)
|
||||||
(setq read-process-output-max (* 1024 1024)) ;; 1mb
|
(setq read-process-output-max (* 1024 1024)) ;; 1mb
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
;; Don't pop up a small window at the bottom of emacs at launch.
|
;; Don't pop up a small window at the bottom of emacs at launch.
|
||||||
inhibit-startup-screen t
|
inhibit-startup-screen t
|
||||||
inhibit-startup-message t
|
inhibit-startup-message t
|
||||||
|
;; Don't show the list of buffers when opening many files.
|
||||||
|
inhibit-startup-buffer-menu t
|
||||||
;; Give the scratch buffer a clean slate.
|
;; Give the scratch buffer a clean slate.
|
||||||
initial-major-mode 'fundamental-mode
|
initial-major-mode 'fundamental-mode
|
||||||
initial-scratch-message nil
|
initial-scratch-message nil
|
||||||
@ -81,4 +83,12 @@
|
|||||||
(setopt auto-revert-check-vc-info t)
|
(setopt auto-revert-check-vc-info t)
|
||||||
(global-auto-revert-mode)
|
(global-auto-revert-mode)
|
||||||
|
|
||||||
|
;;;;; Performance
|
||||||
|
;; Run garbage collect when emacs is idle
|
||||||
|
(run-with-idle-timer 5 t (lambda () (garbage-collect)))
|
||||||
|
(add-function :after after-focus-change-function
|
||||||
|
(lambda ()
|
||||||
|
(unless (frame-focus-state)
|
||||||
|
(garbage-collect))))
|
||||||
|
|
||||||
(provide 'base)
|
(provide 'base)
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
:hook (eglot-managed-mode . company-mode)
|
:hook (eglot-managed-mode . company-mode)
|
||||||
:config
|
:config
|
||||||
(setq company-backends '((company-capf)))
|
(setq company-backends '((company-capf)))
|
||||||
|
(setq company-idle-delay 0) ;; Default 0.2
|
||||||
)
|
)
|
||||||
|
|
||||||
;; (use-package company-box
|
;; (use-package company-box
|
||||||
|
@ -18,5 +18,6 @@
|
|||||||
"[python]": {
|
"[python]": {
|
||||||
"editor.defaultFormatter": "ms-python.black-formatter",
|
"editor.defaultFormatter": "ms-python.black-formatter",
|
||||||
"editor.formatOnSave": true
|
"editor.formatOnSave": true
|
||||||
}
|
},
|
||||||
|
"black-formatter.importStrategy": "fromEnvironment"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user