all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Stefan Kangas <stefankangas@gmail.com>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: bug#30854: 27.0.50; Speeding up package.el startup
Date: Mon, 21 Dec 2020 20:45:17 +0100	[thread overview]
Message-ID: <AM0PR06MB6577A65497EF4D8B8441D71E96C00@AM0PR06MB6577.eurprd06.prod.outlook.com> (raw)
In-Reply-To: <jwv35zzc93v.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 21 Dec 2020 13:31:20 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> (On a related note, I'm not sure that making `package-activate-all'
>>> disappear is TRT.  I think it is useful to keep that function.)
>> When you say "to keep that function" you mean to run it at startup, even
>> when quickstart is activated or you mean to keep it at all as
>> functionality in package.el?
>
> `package-activate-all` is not an internal function (e.g. it's
> documented in `etc/NEWS.27`) so we have to preserve it.
>
> It can be very useful also for users who want to have more control about
> which packages are activated when (e.g. activating packages before the
> end of `early-init.el` or from within `init.el`).
I have to say I am little bit unsure of how this works.

Maybe I missunderstand how it works; but can user activate packages
before the end of early-init.el if they don't require package.el?
Wouldn't it be contradictory to the idea of quickstart?

Docs says new file has to be generated every time activation of a
package is changed:

  "Precompute activation actions to speed up startup.
This requires the use of `package-quickstart-refresh' every time the
activations need to be changed, such as when `package-load-list' is
modified."

>> This does not do any functional change other but avoiding to load
>> package.el when quickstart is active.  If a user would really like to
>> have package.el loaded from the start time, than it is just to call
>> (package-initialize) in user init file?
>
> `package-initialize` is a thing of the past.  Nowadays users should
> never need to call it (that doesn't mean it's never useful: it's used
> internally in various `package.el` functions and there may still be
> cases where it's needed outside of `package.el` but these should be
> considered as bugs, IMO).
Ok; I didn't know. I just checked some interactive functions without
calling package-initialize in a fresh Emacs process and they work, so
it's super.

>>> Does your patch avoid loading package.el?
>> Yes. When package-quickstart.el exists in user-emacs-directory.
>> If that file does not exists then everything is loaded just as before,
>> and (package-activate-all) will be run as normally.
>
> Oh, indeed, that's another option I had not considered.
>
> I was thinking of arranging for `package.el` not to be loaded regardless
> of the use of `package-quickstart` (i.e. preload all of
> `package-activate-all`), but maybe you're right and the only case where
> it's worthwhile avoiding to load `package.el` is when we use
> `package-quickstart`.

I just hacked things with the least effort possible :-). This was the
smallest change I was able to come up with atm.

Are you sure it is worth the efforth? It would move things in two
different places, would need more care to work with later on.

I don't see why someone would not want to use quickstart? So as a
thought: why not make quickstart normal mode how package loading works?

We could move quickstart file into package archives directory, the
"elpa" dir in .emacs.d and when packages are installed instead of emitting
autoloads.el in every directory, we could append them into an autoloads.el
database, i.e. quickstart file.

That would need some extra care to remove and update those correctly
when a package is uninstalled and updated; but if we insert start and
end markers for each package in an elisp comment, it wouldn't be
difficult to implemented.

Alternatively just scratch the file and re-generate on every
update. Does not seem to take awfull lot of time to generate it, so it
would be even easier strategy.

Is that too much or could it work?



  reply	other threads:[~2020-12-21 19:45 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2018-03-19 14:26 Stefan Monnier
2018-03-26 13:42 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR06MB6577A65497EF4D8B8441D71E96C00@AM0PR06MB6577.eurprd06.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.