From: Steinar Bang <sb@dod.no>
To: help-gnu-emacs@gnu.org
Subject: Re: How to profile restoring from .emacs.desktop
Date: Fri, 29 Jan 2021 23:05:04 +0100 [thread overview]
Message-ID: <86k0rvmmb3.fsf@dod.no> (raw)
In-Reply-To: <jwveei4vfjb.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 28 Jan 2021 17:58:07 -0500")
>>>>> 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%
prev parent reply other threads:[~2021-01-29 22:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-27 17:11 How to profile restoring from .emacs.desktop Steinar Bang
2021-01-27 17:42 ` Stefan Monnier
2021-01-28 17:51 ` Steinar Bang
2021-01-28 19:08 ` Stefan Monnier
2021-01-28 22:31 ` Steinar Bang
2021-01-28 22:58 ` Stefan Monnier
2021-01-28 23:33 ` Dmitry Gutov
2021-06-19 9:02 ` project-mode vs projectile (Was: How to profile restoring from .emacs.desktop) Steinar Bang
2021-06-27 0:20 ` Dmitry Gutov
2021-09-05 11:35 ` project-mode vs projectile Steinar Bang
2021-09-05 14:56 ` Nikolay Kudryavtsev
2021-10-07 2:39 ` Dmitry Gutov
2021-01-29 22:05 ` Steinar Bang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86k0rvmmb3.fsf@dod.no \
--to=sb@dod.no \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).