emacs-devel
[Top][All Lists]
Advanced

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

Re: bug#30854: 27.0.50; Speeding up package.el startup


From: Arthur Miller
Subject: Re: bug#30854: 27.0.50; Speeding up package.el startup
Date: Mon, 21 Dec 2020 19:16:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Arthur Miller <arthur.miller@live.com> writes:

> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> Arthur Miller <arthur.miller@live.com> writes:
>>
>>>> Yes: `package-activate-all` (called from `startup.el`).
>>>
>>> See if this is acceptable. I tried to make as few chagnes to package.el
>>> as possible, and I didn't wont to introduce a new file, so I just put
>>> the relevant files into startup.el.
>>
>> FWIW, I think a new file would be better.  We could then also move the
>> bits and pieces from subr.el to this more logical place.
> Aha. I didn't know there are pieces in subr.el also in play here. I am
> not so well introduced into internals.
>
>> (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?
>
> For the latter, I haven't removed anything. When quickstart is active,
> and the package-quickstart.el exists, then we don't need to run it. We
> just need to make Emacs aware of autoloads and load-paths where to find
> those files refered by autoloads. That is qhat package-quickstart.el
> does, so we can just loaded. At least what I think. Seems to work.
>
> User will have to run package-initialize at later time for any
> package.el functions (refreshing contenst, installing, unisntalling
> etc). For me it is quite acceptable cost for the performance gain.
>
>>> I am not sure about package--activated; if quicstart should set it to 't
>>> or not. I don't think is needed, and am not sure if it is straight wrong
>>> to do too in quickstart, so I don't do that.
>>
>> It is still useful if we keep `package-activate-all', I think.
>>
>> But my preference would in any case be to make any functional changes
>> separately from this refactoring.
> 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?
>
>> 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.
I forgott also to say,

I can also udate "user" functions of package.el (package-list,
package-refresh-contents etc) to check if package.el is initialized, and
if not they could call package-initialize on behalf of user, so end users
does not need to call pacakge-initialize themselves, neither in init
file or interactively. As I see now, some of them already do so, some don't.



reply via email to

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