GNU bug report logs -
#80079
[PATCH] Extract parts of package.el used during startup
Previous Next
To reply to this bug, email your comments to 80079 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org:
bug#80079; Package
emacs.
(Sat, 27 Dec 2025 22:12:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Philip Kaludercic <philipk <at> posteo.net>:
New bug report received and forwarded. Copy sent to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org.
(Sat, 27 Dec 2025 22:12:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tags: patch
Here is the idea suggested in bug#74604 to just extract the parts of
package.el that are used during startup. There is a minor change
relative to "feature/package-factorize" in that I did not pull out
`package-initialize', as you reminded me that the function is not really
needed during startup nowadays.
In GNU Emacs 31.0.50 (build 24, x86_64-pc-linux-gnu, GTK+ Version
3.24.49, cairo version 1.18.4) of 2025-12-27 built on siskin
Repository revision: bb76824df2bbe2a2e5b8018c5f8227a9b64df180
Repository branch: master
System Description: Debian GNU/Linux 13 (trixie)
Configured using:
'configure --with-pgtk'
[0001-Extract-parts-of-package.el-used-during-startup.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80079; Package
emacs.
(Mon, 29 Dec 2025 15:55:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 80079 <at> debbugs.gnu.org (full text, mbox):
Philip Kaludercic <philipk <at> posteo.net> writes:
> Tags: patch
>
>
> Here is the idea suggested in bug#74604 to just extract the parts of
> package.el that are used during startup. There is a minor change
> relative to "feature/package-factorize" in that I did not pull out
> `package-initialize', as you reminded me that the function is not really
> needed during startup nowadays.
>
> In GNU Emacs 31.0.50 (build 24, x86_64-pc-linux-gnu, GTK+ Version
> 3.24.49, cairo version 1.18.4) of 2025-12-27 built on siskin
> Repository revision: bb76824df2bbe2a2e5b8018c5f8227a9b64df180
> Repository branch: master
> System Description: Debian GNU/Linux 13 (trixie)
>
> Configured using:
> 'configure --with-pgtk'
Following an off-list discussion with Stefan, we came to the conclusion
that we should discuss the merits of two main proposals:
(a) A "package-hooks.el" that would be preloaded and would only contain
`package-activate-all' (which is currently autoloaded in a `progn')
and any other code that we might want to preload, but nothing else.
If the user doesn't use quickloading, then all of package.el has to be
loaded to activate packages.
(b) A "package-core.el" that would contain `package-activate-all' and all
the code it depends on. This is what I proposed in my first message,
with the exception that I called the file "package-hooks.el" due to a
misunderstanding on my end.
The advantage of option (a) would mainly be maintainability (do
duplicate definitions, less hacky scraping of entire definitions into
loaddefs.el, etc.) while (b) would be a daring change but would come at
the advantage of having to load less code on startup, if the user
doesn't use quickstart.
My preference is towards (b), and with the idea that Yuri suggested
(<CAP_d_8WRVJp7Xr2=cVx-gFDbxu3jX3S4-7JYN2OR06GZeZk-zw <at> mail.gmail.com>)
on emacs-devel, we could even manage to pull out the definitions without
loosing Git authorship history.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80079; Package
emacs.
(Tue, 30 Dec 2025 13:52:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 80079 <at> debbugs.gnu.org (full text, mbox):
Hello,
Philip Kaludercic [29/Dec 3:54pm GMT] wrote:
> Following an off-list discussion with Stefan, we came to the conclusion
> that we should discuss the merits of two main proposals:
>
> (a) A "package-hooks.el" that would be preloaded and would only contain
> `package-activate-all' (which is currently autoloaded in a `progn')
> and any other code that we might want to preload, but nothing else.
> If the user doesn't use quickloading, then all of package.el has to be
> loaded to activate packages.
>
> (b) A "package-core.el" that would contain `package-activate-all' and all
> the code it depends on. This is what I proposed in my first message,
> with the exception that I called the file "package-hooks.el" due to a
> misunderstanding on my end.
>
> The advantage of option (a) would mainly be maintainability (do
> duplicate definitions, less hacky scraping of entire definitions into
> loaddefs.el, etc.) while (b) would be a daring change but would come at
> the advantage of having to load less code on startup, if the user
> doesn't use quickstart.
>
> My preference is towards (b), and with the idea that Yuri suggested
> (<CAP_d_8WRVJp7Xr2=cVx-gFDbxu3jX3S4-7JYN2OR06GZeZk-zw <at> mail.gmail.com>)
> on emacs-devel, we could even manage to pull out the definitions without
> loosing Git authorship history.
Could you provide some numbers? AIUI there are three kinds of user:
1. one not using package at all
2. one using packages with quickloading not enabled
3. one using packages with quickloading enabled
How much stuff does each of these users *avoid* loading, for a regular
session, under each of the two proposals?
--
Sean Whitton
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80079; Package
emacs.
(Tue, 30 Dec 2025 14:02:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 80079 <at> debbugs.gnu.org (full text, mbox):
Sean Whitton <spwhitton <at> spwhitton.name> writes:
> Hello,
>
> Philip Kaludercic [29/Dec 3:54pm GMT] wrote:
>
>> Following an off-list discussion with Stefan, we came to the conclusion
>> that we should discuss the merits of two main proposals:
>>
>> (a) A "package-hooks.el" that would be preloaded and would only contain
>> `package-activate-all' (which is currently autoloaded in a `progn')
>> and any other code that we might want to preload, but nothing else.
>> If the user doesn't use quickloading, then all of package.el has to be
>> loaded to activate packages.
>>
>> (b) A "package-core.el" that would contain `package-activate-all' and all
>> the code it depends on. This is what I proposed in my first message,
>> with the exception that I called the file "package-hooks.el" due to a
>> misunderstanding on my end.
>>
>> The advantage of option (a) would mainly be maintainability (do
>> duplicate definitions, less hacky scraping of entire definitions into
>> loaddefs.el, etc.) while (b) would be a daring change but would come at
>> the advantage of having to load less code on startup, if the user
>> doesn't use quickstart.
>>
>> My preference is towards (b), and with the idea that Yuri suggested
>> (<CAP_d_8WRVJp7Xr2=cVx-gFDbxu3jX3S4-7JYN2OR06GZeZk-zw <at> mail.gmail.com>)
>> on emacs-devel, we could even manage to pull out the definitions without
>> loosing Git authorship history.
>
> Could you provide some numbers? AIUI there are three kinds of user:
>
> 1. one not using package at all
> 2. one using packages with quickloading not enabled
> 3. one using packages with quickloading enabled
>
> How much stuff does each of these users *avoid* loading, for a regular
> session, under each of the two proposals?
Of course, under proposal (a) nothing changes relative to the current
situation:
1. neither package.el nor a quickloads is loaded at startup
2. all of package.el is loaded at startup, and the -autoloads.el files
for all packages
3. only a quickloads file is loaded at startup
and with suggestion (b) it stays similar, just instead of loading
package.el at startup, we just load package-core.el:
1. neither package.el, package-core.el nor a quickloads is loaded at startup
2. only package-core.el is loaded at startup, and the -autoloads.el files
for all packages
3. only a quickloads file is loaded at startup
So the change only affects user of kind 2., which I would estimate would
affect most users who have installed any package, but haven't invested
time into optimising their startup times.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80079; Package
emacs.
(Tue, 30 Dec 2025 17:39:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 80079 <at> debbugs.gnu.org (full text, mbox):
>> 1. one not using package at all
>> 2. one using packages with quickloading not enabled
>> 3. one using packages with quickloading enabled
>>
>> How much stuff does each of these users *avoid* loading, for a regular
>> session, under each of the two proposals?
[...]
> So the change only affects user of kind 2., which I would estimate would
> affect most users who have installed any package, but haven't invested
> time into optimising their startup times.
Indeed, the main question is whether `package-core.el` (i.e. the ~40kB
file Philip has extracted from `package.el`) should be preloaded or not.
OT1H, I'd expect it would be needed at startup for the majority of users
(I expect that the vast majority of users install packages via
`package.el` and only a small proportion has enabled `package-quickstart`),
which argues in favor of preloading it.
OTOH those users will probably load a non-trivial number of other files at
startup (both `<PKG>-pkg.el` and `<PKG>-autoloads.el` for each and every
installed package), so an extra 40kB file is "lost in the noise".
And there's also the argument that if we care about startup speed we
should promote `package-quickstart` instead.
Stefan
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.