emacs-devel
[Top][All Lists]
Advanced

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

Re: Loading a package applies automatically to future sessions?


From: Clément Pit-Claudel
Subject: Re: Loading a package applies automatically to future sessions?
Date: Mon, 29 Jan 2018 15:18:16 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

On 2018-01-29 14:08, Stefan Monnier wrote:
> I don't think I can easily bring down the speed of package-initialize
> much below 0.1s for my 200 packages on my Thinkpad T61.

FWIW, activating about 100 packages in my config takes about .4s:

              - package-initialize                                232  89%
               + package-activate                                 136  52%
               + package-read-all-archive-contents                 64  24%
               + package-load-all-descriptors                      24   9%
               + package--build-compatibility-table                  8   3%

More precisely:

              - package-initialize                                232  89%
               - package-activate                                 136  52%
                - package-activate-1                              136  52%
                 - package--load-files-for-activation              96  36%
                  - package--activate-autoloads-and-load-path      68  26%
                   + load                                          68  26%
                  + file-truename                                  28  10%
                 - package-activate                                32  12%
                  + package-activate-1                             32  12%
                 - require                                          8   3%
                  + defvar                                          4   1%
               - package-read-all-archive-contents                 64  24%
                - package-read-archive-contents                    64  24%
                 - package--add-to-archive-contents                44  16%
                  + package--append-to-alist                        4   1%
                   package--read-archive-file                      20   7%
               - package-load-all-descriptors                      24   9%
                - package-load-descriptor                          24   9%
                 + package-process-define-package                   8   3%
                   #<compiled 0xd255c5>                             4   1%
               + package--build-compatibility-table                 8   3%

The reverse tree is also interesting:

+ file-truename                                                    60  23%
+ package--add-to-archive-contents                                 40  15%
  Automatic GC                                                     24   9%
+ package--read-archive-file                                       20   7%
+ load-with-code-conversion                                        16   6%
+ eval-buffer                                                      16   6%
+ package-load-descriptor                                          12   4%
+ package--mapc                                                     8   3%
+ let                                                               4   1%
+ #<compiled 0xd255c5>                                              4   1%
+ package-desc-from-define                                          4   1%
+ version-to-list                                                   4   1%
+ package-desc-priority-version                                     4   1%

It looks likes package--add-to-archive-contents is linear in the number of 
packages, and called once per package?
I'm not sure why file-truename is called that much.

Clément.



reply via email to

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