perf: disable autoload-compute-prefixes & optimize var cache

- Batch more variables in Doom's autoloads files.
- Remove all the register-definition-prefixes calls generated in
  autoloads files (for both modules' and packages' autoloads). These
  don't serve much purpose, and only incur added cost growing a large
  hash table.
This commit is contained in:
Henrik Lissner 2022-09-20 01:43:33 +02:00
parent 16469f1f9d
commit 024048dd5e
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
3 changed files with 9 additions and 8 deletions

View file

@ -12,12 +12,11 @@ hoist buggy forms into autoloads.")
"List of regexps whose matching files won't be indexed for autoloads.")
(defvar doom-autoloads-cached-vars
'(doom-modules
doom-disabled-packages
native-comp-deferred-compilation-deny-list
load-path
'(load-path
auto-mode-alist
interpreter-mode-alist
magic-mode-alist
magic-fallback-mode-alist
Info-directory-list)
"A list of variables to be cached in `doom-autoloads-file'.")
@ -145,6 +144,7 @@ hoist buggy forms into autoloads.")
(version-control 'never)
case-fold-search ; reduce magic
autoload-timestamps ; reduce noise in generated files
autoload-compute-prefixes
;; So `autoload-generate-file-autoloads' knows where to write it
(generated-autoload-load-name (file-name-sans-extension file))
(target-buffer (current-buffer))