1

My understanding of Emacs's package management is that Emacs automatically loads all installed packages.

use-package itself is a package, which only becomes usable after (package-initialize), at which point all packages have already been loaded.

I was just wondering how exactly use-package reduce startup time for Emacs? Can anybody explain this at a high level?

1

It doesn't do anything you couldn't be doing without it; so the answer might well be that it doesn't improve performance at all. It could vary from user to user.

It does encapsulate some mechanisms (which you might already be using) for making good use of autoloading and deferred evaluation of code, in order to avoid loading libraries any earlier than necessary; so users who weren't doing that might well see noticeable improvements to their start-up times after converting their configs to use-package.

My understanding of Emacs's package management is that Emacs automatically loads all installed packages.

Only the autoloads file for each package is loaded during package initialisation. If you were to load each individual elisp library provided by each package, that would take a lot longer.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.