mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-09 12:57:25 -05:00
Refactor comp-effective-async-max-jobs advice
We only need this magic in CLI sessions. It's better to only use half the CPUs in interactive sessions (if the user has enabled comp-deferred-compilation for some reason). Fixes #5042
This commit is contained in:
@ -70,6 +70,12 @@ purpose.")
|
||||
;; Stop user configuration from interfering with package management
|
||||
(setq enable-dir-local-variables nil)
|
||||
|
||||
;; Default to using all cores, rather than half of them, since we compile things
|
||||
;; ahead-of-time in a non-interactive session.
|
||||
(defadvice! doom--comp-use-all-cores-a (&rest _)
|
||||
:before #'comp-effective-async-max-jobs
|
||||
(setq comp-num-cpus (doom-system-cpus)))
|
||||
|
||||
|
||||
;;
|
||||
;;; Entry point
|
||||
|
Reference in New Issue
Block a user