User Tools

Site Tools


development:emacs:startup-perf

Startup Performance

Measure your Emacs startup time by the help of this command:

time emacs --eval '(kill-emacs)'

and compare with:1)

time emacs -Q --eval '(kill-emacs)'

There are several ways to improve startup time:

  1. use Emacs server and emacsclient whenever you can;
  2. (auto-) load packages on demand (not in advance, eval-after-load and autoload are your friends);
  3. increase the value of custom option gc-cons-threshold (garbage collector threshold);
  4. do not output a lot of messages;
  5. avoid file I/O if you can:
    • no recentf-mode;
    • turn IDO history off: (setq ido-save-directory-list-file nil);
    • no persistent Org clock (setq org-clock-presist nil);
    • no automatic tags table loading (visit-tags-table).
1)
So you can calculate the performance loss caused by an extensive init file.
development/emacs/startup-perf.txt · Last modified: 2023/08/15 11:13 by Ralf H.