native-comp: use all cores instead of half
This commit is contained in:
parent
22b4462e18
commit
db6a27c37c
1 changed files with 15 additions and 1 deletions
16
core/core.el
16
core/core.el
|
@ -292,7 +292,21 @@ config.el instead."
|
|||
(concat "\\`" (regexp-quote doom-local-dir) ".*/jupyter-channel\\.el\\'")
|
||||
(concat "\\`" (regexp-quote doom-local-dir) ".*/with-editor\\.el\\'")
|
||||
(concat "\\`" (regexp-quote doom-autoloads-file) "'")))
|
||||
(add-to-list 'comp-deferred-compilation-deny-list entry)))
|
||||
(add-to-list 'comp-deferred-compilation-deny-list entry))
|
||||
|
||||
;; 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 ()
|
||||
:override #'comp-effective-async-max-jobs
|
||||
(if (zerop comp-async-jobs-number)
|
||||
(or comp-num-cpus
|
||||
(setf comp-num-cpus
|
||||
(max 1 (cond ((eq 'windows-nt system-type)
|
||||
(string-to-number (getenv "NUMBER_OF_PROCESSORS")))
|
||||
((executable-find "nproc")
|
||||
(string-to-number (cdr (doom-call-process "nproc"))))
|
||||
(t 1)))))
|
||||
comp-async-jobs-number)))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue