[Top][All Lists]

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

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

From: Dmitry Gutov
Subject: bug#19390: 25.0.50; `package-activate' is too slow
Date: Tue, 16 Dec 2014 16:31:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

On 12/16/2014, Artur Malabarba wrote:

> I didn't notice anything as aggravating as the report, but I agree my
> latest patch is a performance concern.

Do you maybe have fewer packages installed?

avoid a lot of
calls to `file-truename'. This, I suspect, is the bigger performance

Any particular reason you're using `file-truename', instead of `expand-file-name'? Replacing the former with the latter already gives ~twofold performance improvement.

2. Creating the `history' variable as below is a problem.

(mapcar (lambda (x) (file-name-sans-extension
                                   (file-truename (car x))))

With the above change, this piece of code is relatively fast.

For instance, (package--list-loaded-files default-directory) in the Helm directory takes 140 ms here, whereas

            (mapcar (lambda (x) (file-name-sans-extension
                                 (expand-file-name (car x))))

only takes ~10 ms. Still not fast enough not to need the other patch, of course.

reply via email to

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