            (when quelpa-modified-p
              (quelpa-save-cache))))))
 
-(defun doom/byte-compile ()
-  "Byte (re)compile the important files in your emacs configuration. No more no
-less."
-  (interactive)
-  (doom-package-init)
-  (mapc 'byte-compile-file
-        (append (list (expand-file-name "init.el" doom-emacs-dir)
-                      (expand-file-name "core.el" doom-core-dir))
-                (reverse
-                 (file-expand-wildcards
-                  (expand-file-name "core*.el" doom-core-dir)))
-                (file-expand-wildcards
-                 (expand-file-name "*/*/packages.el" doom-modules-dir)))))
-
-(defun doom/refresh-autoloads (&optional inhibit-require)
-  "Refreshes your emacs config's autoloads file. Use this if you modify an
-autoload.el file in any module."
-  (interactive)
-  (let ((generated-autoload-file (concat doom-modules-dir "autoloads.el"))
+(defun doom/byte-compile (&optional comprehensive-p)
+  "Byte (re)compile the important files in your emacs configuration. DOOM Emacs
+was designed to benefit a lot from this. If COMPREHENSIVE-P is non-nil, compile
+config.el and autoload.el files as well -- the performance benefit from this is
+minor and may take a while.
+
+No need to recompile any of these files so long as `auto-compile-mode' is on in
+`emacs-lisp-mode', which, if you're using the provided emacs-lisp module, should
+be the case."
+  (interactive)
+  (let (use-package-always-ensure)
+    (doom-package-init)
+    (mapc 'byte-compile-file
+          (append (list (expand-file-name "init.el" doom-emacs-dir)
+                        (expand-file-name "core.el" doom-core-dir))
+                  (reverse
+                   (f-glob "core-*.el" doom-core-dir))
+                   (f-glob "*/*/packages.el" doom-modules-dir)
+                  (when comprehensive-p
+                    (f-glob "*/*/config.el" doom-modules-dir))
+                  (when comprehensive-p
+                    (f-glob "*/*/autoload.el" doom-modules-dir))))))
+
+(defun doom/refresh-autoloads ()
+  "Refreshes the autoloads.el file, which tells Emacs where to find all the
+autoloaded functions in the modules you use or among the core libraries.
+
+Rerun this whever you modify your init.el (or use `make autoloads` from the
+command line)."
+  (interactive)
+  (let ((generated-autoload-file (concat doom-local-dir "autoloads.el"))
         (interactive-p (called-interactively-p 'interactive))
         (autoload-files
-         (file-expand-wildcards
-          (expand-file-name "*/*/autoload.el" doom-modules-dir))))
+         (append (-filter 'file-exists-p
+                          (mapcar (lambda (m)
+                                    (f-expand
+                                     (format "%s/%s/autoload.el" (substring (symbol-name (car m)) 1) (cdr m))
+                                     doom-modules-dir))
+                                  doom-modules))
+                 (f-glob "autoload/*.el" doom-core-dir))))
     (when (file-exists-p generated-autoload-file)
       (delete-file generated-autoload-file)
       (when interactive-p (message "Deleted old autoloads.el")))
     (dolist (file autoload-files)
       (update-file-autoloads file t)
-      (when interactive-p
-        (message "Detected: %s"
-                 (file-relative-name (directory-file-name parent)
-                                     doom-emacs-dir))))
+      (unless interactive-p
+        (message "Detected: %s" (f-relative file doom-emacs-dir))))
     (when interactive-p (message "Done!"))
     (with-demoted-errors "WARNING: %s"
-      (load "autoloads"))))
+      (load generated-autoload-file nil t))))
 
 (provide 'core-packages)
 ;;; core-packages.el ends here

                         (package--find-non-dependencies)))))

(defun doom/packages-clean ()
  "Delete unused packages."
  (interactive)
  (doom-package-init t)
  (let* ((package-selected-packages (-intersection (package--find-non-dependencies) doom-packages))

      (not (version-list-<= newest-version installed-version)))))

(defun doom/packages-reload ()
  "Reload `load-path' by scanning all packages. Run this if you ran make update
or make clean outside of Emacs."
  (interactive)
  (setq load-path doom--load-path)
  (doom-package-init t)
  (when (called-interactively-p 'interactive)
    (message "Reloaded %s packages" (length package-alist))))

(defun doom/packages-update ()
  "Update outdated packages. This includes quelpa itself, quelpa-installed
packages, and ELPA packages. This will delete old versions of packages as well."
  (interactive)
  (doom-package-init t)
  (quelpa-upgrade) ; upgrade quelpa + quelpa-installed packages
  (mapc (lambda (package)
          (condition-case ex
              (let ((desc (cadr (assq package package-alist))))
