unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30854: 27.0.50; Speeding up package.el startup
@ 2020-12-18 10:56 arthur.miller
  2020-12-18 15:02 ` Stefan Monnier
  0 siblings, 1 reply; 42+ messages in thread
From: arthur.miller @ 2020-12-18 10:56 UTC (permalink / raw)
  To: emacs-devel

> There are many ways to make Emacs's startup slow.
> One of them is to have many packages installed.  The growing popularity
> of ELPA means that it's now common for users to have hundreds of ELPA
> packages installed, which will easily cause Emacs's startup to take at
> least 1s even with an empty ~/.emacs.  For users like me who (re)start
> their Emacs session only rarely, this is not an issue, but for others it
> can be an annoyance that's significant enough to try and circumvent it
> by not using package.el (e.g. installing all their packages by hand or
> using other packaging like DOOM).
> 
> If there's no objection, I plan on installing the patch below which
> below lets users cut down package.el startup time by skipping package's
> initialization and instead loading a single precomputed file which is
> the concatenation of all the installed <pkg>-autoloads.el.  In my
> experience this speeds up activation of package.el by a factor 5.
> We could speed it up even further by byte-compiling this file, but this
> has bumped into some corner cases problems so I'm sticking to
> a non-compiled file for now.
> 
> 
> 
>         Stefan

Which corner cases apply to this? If it is OK to ask you?

I have been playing with my own init, and I see quite a speed-up by
compiling and baking package-quickstart.el into my init file (with
disabled package-quickstart).

I have also optimized it slightly: every autoload file adds it's own
path to load-path via add-to-list at startup time. But all those paths
are known when package-quickstart-refresh runs, so we can simply
concatenate them to one list and then emit code to just nconc emitted
that list to load-path at startup (this is what I do in my init file).

Together with that optimization and byte-compiling init file with baked
package-quickstart.el I see quite a speed-up, compared to non
byte-compiled package-quickstart.el as it is in Emacs.

Init time for daemon process decreased from ~0.06 to ~0.02 by just doing
this. My Gui emacs starts at almost same speed as Emacs with -Q flag
with this. My init file is not the worlds largest, currently I have only
~60 packages but it might be of interest to other Emacs users if those
corner cases were maybe worked out so that package-quickstart.el can be
byte compiled by default?



^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2020-12-22 20:45 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-18 10:56 bug#30854: 27.0.50; Speeding up package.el startup arthur.miller
2020-12-18 15:02 ` Stefan Monnier
2020-12-18 16:05   ` arthur.miller
2020-12-18 16:37     ` Stefan Monnier
2020-12-18 22:58       ` Basil L. Contovounesios
2020-12-18 23:26         ` Stefan Monnier
2020-12-19 16:34       ` arthur.miller
2020-12-19 17:59         ` Stefan Monnier
2020-12-19 18:23           ` Stefan Kangas
2020-12-19 20:56             ` Stefan Monnier
2020-12-20  2:47               ` Pankaj Jangid
2020-12-20 14:23               ` Arthur Miller
2020-12-20 14:52                 ` Stefan Monnier
2020-12-20 15:13                   ` Arthur Miller
2020-12-20 17:16                     ` Stefan Monnier
2020-12-20 22:23                       ` arthur miller
2020-12-20 23:35                       ` arthur miller
2020-12-20 23:44                         ` Stefan Monnier
2020-12-20 23:46                           ` arthur miller
2020-12-21 16:32                           ` Arthur Miller
2020-12-21 17:11                             ` Stefan Kangas
2020-12-21 17:32                               ` Arthur Miller
2020-12-21 18:16                                 ` Arthur Miller
2020-12-21 18:58                                   ` Stefan Monnier
2020-12-21 19:51                                     ` Arthur Miller
2020-12-21 18:31                                 ` Stefan Monnier
2020-12-21 19:45                                   ` Arthur Miller
2020-12-21 20:03                                     ` Stefan Monnier
2020-12-21 20:58                                       ` Arthur Miller
2020-12-21 22:14                                         ` Stefan Monnier
2020-12-21 23:15                                           ` Arthur Miller
2020-12-22  3:35                                             ` Stefan Monnier
2020-12-22 11:03                                               ` Arthur Miller
2020-12-22 14:50                                                 ` Stefan Monnier
2020-12-22 16:55                                                   ` Arthur Miller
2020-12-22 17:20                                                     ` Stefan Monnier
2020-12-22 18:24                                                       ` Arthur Miller
2020-12-22 19:44                                                         ` Stefan Monnier
2020-12-22 20:45                                                           ` Arthur Miller
2020-12-20 23:45                       ` arthur miller
2020-12-19 21:12             ` arthur miller
2020-12-19 21:16             ` arthur miller

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).