-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[low prio] [feature inquiry] GCMH: Garbage Collector Magic Hack: suitable for Spacemacs? #16145
Comments
Emacs maintainer Eli Zaretskii has useful information on a default value if its to be included in Spacemacs. Personally what made the biggest difference for me for spacemacs performance is
Setting =savehist-autosave-interval= to 60 seconds (from the default of 300) and Here's my config for savehist, (setf history-length 25
savehist-save-minibuffer-history nil
savehist-autosave-interval nil
kill-ring-max 200
savehist-mode nil)
(delq 'mark-ring savehist-additional-variables)
(delq 'global-mark-ring savehist-additional-variables)
(delq 'search-ring savehist-additional-variables)
(delq 'regexp-search-ring savehist-additional-variables)
(delq 'extended-command-history savehist-additional-variables)
(delq 'kill-ring savehist-additional-variables)
(put 'org-brain-headline-cache 'history-length 10)
(put 'bibtex-completion-cache 'history-length 10)
(push 'org-brain-headline-cache savehist-additional-variables)
(push 'bibtex-completion-cache savehist-additional-variables)
(push 'helm-ff-history savehist-additional-variables)
(push 'org-clock-history savehist-additional-variables)
;; Emacs profiler shows `savehist-autosave' is very performance intensive.
(add-hook 'kill-emacs-hook #'savehist-save) ; Savehist only on exit.
;; I prefer no battery info on my modeline. Emacs profiler tells me the
;; package uses a lot of battery itself.
;; Ditto for icons, lots of wasted cpu cycles for no functionality.
;; Symon is cute, but https://github.com/zk-phi/symon/issues/42 shows
;; that a significant performance price is paid.
(spacemacs-modeline :packages (not
anzu
fancy-battery
font-lock+
neotree
;; spaceline-all-the-icons
symon
vim-powerline))
(spacemacs-navigation :packages (not
restart-emacs
;; `avy-goto-word-or-subword-1' is a more general use case.
ace-link
;; I believe the winum (SPC 1) and avy-word (jumps across windows)
;; is enough.
ace-window
;; package-list-packages and
;; package-menu-filter-by-keyword "status:installed"
;; paradox
;; More gimmicky than useful.
golden-ratio
;; Utility packages that I have no use for.
centered-cursor-mode
open-junk-file
auto-highlight-symbol)) A lot of low hanging fruit in my opinion. Definitely a system-specific setting. I would help test a PR. |
Thanks for the detailed suggestion! I found this comment on the Doom Emacs repo yesterday, with some insights on the matter by Henrik Lissner: doomemacs/doomemacs#3108 Still, I'm going to test the profiler on x86_64 Linux + macOS & i686 Linux, then come back with results. |
Actually Spacemacs already do that. |
Then I have nothing else to add. |
I recently found out about Andrea Corallo's Garbage Collector Magic Hack (gcmh), which changes GC thresholds at load time and after finished loading Emacs, to allow for quicker startup and shortening GC pauses:
https://akrl.sdf.org
However, as memory usage goes with Spacemacs and multiple layers, I wanted to ask if you think it's worth adding as a feature or layer.
The text was updated successfully, but these errors were encountered: