unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* package.el should be preloaded
@ 2010-10-28  7:41 Glenn Morris
  2010-10-28  7:57 ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2010-10-28  7:41 UTC (permalink / raw)
  To: emacs-devel


In startup.el, command-line contains:

  ;; Load ELPA packages.
  (and user-init-file package-enable-at-startup (package-initialize))

where both package-* are autoloaded.

package-enable-at-startup is non-nil by default, so shouldn't
package.el be preloaded, to speed up normal startup?



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

* Re: package.el should be preloaded
  2010-10-28  7:41 package.el should be preloaded Glenn Morris
@ 2010-10-28  7:57 ` Glenn Morris
  2010-10-28 14:24   ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2010-10-28  7:57 UTC (permalink / raw)
  To: emacs-devel


This was briefly mentioned before

http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00634.html

But it is loaded in every normal startup, whether or not I have any
packages installed. Surely it is impossible to tell if I have any
packages to load without loading package.el to search for them; so I
don't see any reason not to preload it.



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

* Re: package.el should be preloaded
  2010-10-28  7:57 ` Glenn Morris
@ 2010-10-28 14:24   ` Stefan Monnier
  2010-10-31  0:09     ` Chong Yidong
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2010-10-28 14:24 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

> This was briefly mentioned before

> http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00634.html

> But it is loaded in every normal startup, whether or not I have any
> packages installed. Surely it is impossible to tell if I have any
> packages to load without loading package.el to search for them; so I
> don't see any reason not to preload it.

I agree we should preload it.  But we should do it by splitting the part
that need to be preloaded into package-hooks.el.


        Stefan



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

* Re: package.el should be preloaded
  2010-10-28 14:24   ` Stefan Monnier
@ 2010-10-31  0:09     ` Chong Yidong
  2010-11-01  1:20       ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Chong Yidong @ 2010-10-31  0:09 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

>> This was briefly mentioned before
>
>> http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00634.html
>
>> But it is loaded in every normal startup, whether or not I have any
>> packages installed. Surely it is impossible to tell if I have any
>> packages to load without loading package.el to search for them; so I
>> don't see any reason not to preload it.
>
> I agree we should preload it.  But we should do it by splitting the part
> that need to be preloaded into package-hooks.el.

I looked into this, but it turns out that most of package.el would need
to be preloaded.  Instead, I tweaked the code startup.el to check more
aggressively for local package directories, so that package.el won't be
loaded if no packages are installed.



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

* Re: package.el should be preloaded
  2010-10-31  0:09     ` Chong Yidong
@ 2010-11-01  1:20       ` Stefan Monnier
  2010-11-01 15:01         ` Chong Yidong
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2010-11-01  1:20 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

> I looked into this, but it turns out that most of package.el would need
> to be preloaded.

That's really strange.  The code needed at startup shouldn't need to be
that large.  Of course, that was part of the reason why I want(ed) all
the job of finding which packages to load in which order to be done
"offline" rather than at startup.

> Instead, I tweaked the code startup.el to check more aggressively for
> local package directories, so that package.el won't be loaded if no
> packages are installed.

It's better than nothing, but we'll need a better answer as soon as
people get used to installing packages, such that the "no installed
package" case becomes rare.


        Stefan



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

* Re: package.el should be preloaded
  2010-11-01  1:20       ` Stefan Monnier
@ 2010-11-01 15:01         ` Chong Yidong
  0 siblings, 0 replies; 6+ messages in thread
From: Chong Yidong @ 2010-11-01 15:01 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

> That's really strange.  The code needed at startup shouldn't need to be
> that large.  Of course, that was part of the reason why I want(ed) all
> the job of finding which packages to load in which order to be done
> "offline" rather than at startup.

The total length of package.el is 1642 lines.  Of these, the code
necessary to load and activate packages at startup comes to around 590
lines, or about 16k of memory in the .elc.  (The rest is the code for
downloading and installing, and for the package menu.)

Splitting package.el is certainly doable, but all it will save us is
around 30k.  I'm not sure it's worth it.



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

end of thread, other threads:[~2010-11-01 15:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-28  7:41 package.el should be preloaded Glenn Morris
2010-10-28  7:57 ` Glenn Morris
2010-10-28 14:24   ` Stefan Monnier
2010-10-31  0:09     ` Chong Yidong
2010-11-01  1:20       ` Stefan Monnier
2010-11-01 15:01         ` Chong Yidong

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).