From: Artur Malabarba <bruce.connor.am@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 19390@debbugs.gnu.org
Subject: bug#19390: 25.0.50; `package-activate' is too slow
Date: Tue, 16 Dec 2014 20:00:00 -0200 [thread overview]
Message-ID: <CAAdUY-+sNuVMxUBQSQhjV5Pd3ML3BCzL3TFA7PakTLXcgj0DUw@mail.gmail.com> (raw)
In-Reply-To: <86y4q7r0x5.fsf@yandex.ru>
2014-12-16 14:53 GMT-02:00 Dmitry Gutov <dgutov@yandex.ru>:
> That aside, it's too bad not the whole of discussion leading to this
> implementation is public.
The discussion started here:
http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00567.html
Oddly enough, I can't find the end of it. =/
I'll be glad to explain any of the considerations.
> Have the following alternative implementation options been considered?
> Since we only actually want to reload when upgrading, or reinstalling
> packages, maybe some key logic can move into `package-delete'.
Besides the points I mention below, there's one edge case where this
could be a problem. Built-in packages can be upgraded too, and they
can't be deleted.
> For instance:
>
> 1. Instead of scanning through the whole load-history when activating a
> package, we could have a list of paths that belonged to packages that we
> uninstalled during the current session. It would be collected in
> `package-delete', and it would certainly be empty at startup.
The way it's done right now, package-delete is called after
package-install during upgrades, so that would need to change in order
for this implementation to work.
I would rather ask on the devel-list before making a change like this
(I don't know if there's a particular reason behind the original
choice), but other than that, that sounds like a good solution.
> 2. Instead of saving paths, remove elements from the `features' list
> when a package is deleted. Then when a dependency of this package is
> installed (or even autoloaded [0]), it would load the new files, because
> they're not in features.
Again, this relies on us deleting before installing, but I prefer you
first idea. Removing elements from `features' could have unintended
consequences. We're pretending the package isn't loaded even though it
is (all its functions and variables are bound).
>
> [0] IIUC, the current approach doesn't cover this situation.
The current approach does cover autoloads. The autoloads file of a
package is always `load'ed when a package is activated (which always
happens when a package is installed, even after an upgrade). Calling
`load' on a file which contains a new definition for an already
defined autoload (which is what happens on upgrades) redefines the
autoload to the new definition.
next prev parent reply other threads:[~2014-12-16 22:00 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 17:34 bug#19390: 25.0.50; `package-activate' is too slow Dmitry Gutov
[not found] ` <handler.19390.B.14186649209005.ack@debbugs.gnu.org>
2014-12-16 0:41 ` bug#19390: Acknowledgement (25.0.50; `package-activate' is too slow) Dmitry Gutov
2014-12-16 12:32 ` bug#19390: 25.0.50; `package-activate' is too slow Dmitry Gutov
2014-12-16 13:26 ` Artur Malabarba
2014-12-16 13:42 ` Artur Malabarba
2014-12-16 14:31 ` Dmitry Gutov
2014-12-16 21:35 ` Artur Malabarba
2014-12-16 23:16 ` Stefan Monnier
2014-12-16 23:27 ` Dmitry Gutov
2014-12-16 23:55 ` Stefan Monnier
2014-12-17 0:40 ` Artur Malabarba
2014-12-17 1:17 ` Dmitry Gutov
2014-12-17 14:33 ` Artur Malabarba
2014-12-17 2:41 ` Dmitry Gutov
2014-12-17 10:47 ` Artur Malabarba
2014-12-18 0:14 ` Dmitry Gutov
2014-12-18 1:38 ` Stefan Monnier
2014-12-18 2:11 ` Artur Malabarba
2014-12-18 10:37 ` Dmitry Gutov
2014-12-18 14:30 ` Stefan Monnier
2014-12-18 14:47 ` Dmitry Gutov
2014-12-18 15:39 ` Artur Malabarba
2014-12-18 15:47 ` Artur Malabarba
2014-12-18 16:15 ` Dmitry Gutov
2014-12-18 17:50 ` Artur Malabarba
2014-12-18 17:54 ` Dmitry Gutov
2014-12-18 18:40 ` Stefan Monnier
2014-12-18 19:13 ` Artur Malabarba
2014-12-19 4:31 ` Stefan Monnier
2014-12-19 12:08 ` Artur Malabarba
2014-12-18 18:37 ` Stefan Monnier
2014-12-18 15:49 ` Dmitry Gutov
2014-12-18 16:45 ` Dmitry Gutov
2014-12-18 16:14 ` Artur Malabarba
2014-12-18 15:15 ` Artur Malabarba
2014-12-18 15:45 ` Dmitry Gutov
2014-12-18 17:39 ` Artur Malabarba
2014-12-18 17:52 ` Dmitry Gutov
2014-12-18 19:01 ` Artur Malabarba
2014-12-18 19:49 ` Dmitry Gutov
2014-12-18 18:42 ` Stefan Monnier
2014-12-18 18:45 ` Dmitry Gutov
2014-12-16 16:53 ` Dmitry Gutov
2014-12-16 22:00 ` Artur Malabarba [this message]
2014-12-17 1:05 ` Dmitry Gutov
2014-12-16 23:19 ` Stefan Monnier
2014-12-16 23:40 ` Dmitry Gutov
2014-12-16 23:56 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAdUY-+sNuVMxUBQSQhjV5Pd3ML3BCzL3TFA7PakTLXcgj0DUw@mail.gmail.com \
--to=bruce.connor.am@gmail.com \
--cc=19390@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/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 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).