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

From: Artur Malabarba <[email-masked]>
Date: Wed, 17 Dec 2014 08:47:57 -0200

On 17 Dec 2014 00:41, "Dmitry Gutov" <[email-masked]> wrote:
> +  (let* ((old-dir-re (concat "\\`"
> +                             (regexp-quote (file-truename
package-user-dir))
> +                             "/" (regexp-quote (symbol-name name))))
> +         (filtered-history (cl-loop for entry in load-history
> +                                    for file = (car entry)
> +                                    when (string-match-p old-dir-re file)
> +                                    collect (file-name-sans-extension
file)))

This will fail if the previously loaded version wasn't installed in the
package-user-dir,  which, again, is the case for built-in packages. This
also includes manually installed packages, which we may or may not care
about supporting.