Subject: bug#19390: 25.0.50; `package-activate' is too slow

From: Dmitry Gutov <[email-masked]>
Date: Tue, 16 Dec 2014 18:53:42 +0200

That aside, it's too bad not the whole of discussion leading to this
implementation is public.

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

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.

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.

[0] IIUC, the current approach doesn't cover this situation.