help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs startup is suddenly slow


From: Stefan Monnier
Subject: Re: Emacs startup is suddenly slow
Date: Sun, 02 Oct 2022 23:06:15 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> Of course,emacs -q starts in under 2secs ; Here is the log:
>
> Loading /etc/emacs/site-start.d/00debian.el (source)...done
> Loading /etc/emacs/site-start.d/50autoconf.el (source)...done
> Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
> Loading debian-ispell...
> Loading /var/cache/dictionaries-common/emacsen-ispell-default.el
> (source)...done
> Loading debian-ispell...done
> Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el
> (source)...done
> Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
> For information about GNU Emacs and the GNU system, type C-h C-a.

`emacs -q` loads the site-specific files but not your personal config,
so the above is all the site-specific things.  And it seems they're
fast enough.

> So I figured that those loading commands (image-file, display-line-numbers,
> tab-line, savehist and paren, that all look important) were site-specific,
> and tried

No, the contrary`

> emacs --no-site-file
>
> But they seem to still be here, and still are quite blocking:
>
> Here is the log:
>
> Loading image-file...done
> Loading display-line-numbers...done
> Loading tab-line...done
> Loading savehist...done
> Loading paren...done
> Emacs 27.1 loaded in 12.02 seconds with 8 garbage collections.

Indeed, because these messages result from loading your own personal
config.  So, presumably *you* should know where they come from :-)

[ IIRC the above messages presumably come from your init file having
  explicit `load` (or `load-file`) calls to load those files, which is
  a bad idea since loading a file usually doesn't "do" anything.
  Instead you should just call `display-line-numbers-mode`, or
  `savehist-mode`, ... and the files will be auto-loaded for you (if
  needed), without emitting the above messages.  ]

Also your description suggests that Emacs sits "idle" for more than 5s
between the loading of the site-specific files and your own personal
init file.  So maybe the problem is in neither of those but
somewhere else instead.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]