[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to profile restoring from .emacs.desktop
From: |
Steinar Bang |
Subject: |
Re: How to profile restoring from .emacs.desktop |
Date: |
Fri, 29 Jan 2021 23:05:04 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) |
>>>>> Stefan Monnier <monnier@iro.umontreal.ca>:
> You might want to file a bug report with the maintainer of Projectile, then.
> Clearly, your profile indicates that it's doing "too much work".
Turns out this was a user error.
I had this setting in ~/.emacs:
(setq projectile-project-search-path '("~/workspaces/" "~/git/"))
This causes projectile to scan all of the subdirectories of those
directories for project on startup.
And there are a *lot* of project directories to scan under those!
When I removed this setting (defaults to nil), desktop restored in a
much shorter time.
Here's the results of profiler-report from desktop restore, opened on
the interesting nodes:
- normal-top-level 20214 91%
- command-line 20214 91%
- command-line-1 20206 91%
- eval 20206 91%
- progn 20206 91%
- desktop-read 20206 91%
- load 20040 90%
- load-with-code-conversion 20040 90%
- eval-buffer 20026 90%
- desktop-create-buffer 19978 90%
- desktop-restore-file-buffer 8029 36%
- find-file-noselect 7865 35%
- find-file-noselect-1 4813 21%
- after-find-file 4621 20%
+ run-hooks 2564 11%
+ normal-mode 2020 9%
+ auto-save-mode 20 0%
+ file-truename 134 0%
+ insert-file-contents 17 0%
abbreviate-file-name 4 0%
+ create-file-buffer 433 1%
+ find-buffer-visiting 292 1%
+ file-truename 210 0%
abbreviate-file-name 42 0%
+ switch-to-buffer 147 0%
+ projectile-mode 5696 25%
+ dired-restore-desktop-buffer 3839 17%
+ bury-buffer 1411 6%
+ rename-buffer 466 2%
+ desktop-load-file 359 1%
+ auto-revert-mode 62 0%
+ flycheck-mode 12 0%
visual-line-mode 6 0%
editorconfig-mode 5 0%
buffer-list 2 0%
+ internal-macroexpand-for-load 12 0%
+ do-after-load-evaluation 12 0%
+ desktop-restore-frameset 162 0%
+ byte-code 4 0%
+ lisp-interaction-mode 4 0%
+ ... 1360 6%
+ timer-event-handler 486 2%
+ command-execute 98 0%
+ redisplay_internal (C function) 34 0%
+ flycheck-handle-signal 4 0%