Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profiling startup times #3911

Closed
darkfeline opened this issue Nov 22, 2015 · 7 comments
Closed

Profiling startup times #3911

darkfeline opened this issue Nov 22, 2015 · 7 comments
Labels
Documentation ✏ stale marked as a stale issue/pr (usually by a bot)

Comments

@darkfeline
Copy link
Contributor

Does Spacemacs provide any features for profiling startup times? Recently my startup times have spiked dramatically (100-250 seconds) and I want to pin it down more precisely than the old comment-out binary search.

@StreakyCobra
Copy link
Contributor

Can you be a victim of this?

Otherwise in develop there is emacs --debug-init --timed-requires as I saw it there. Never tested though.

@darkfeline
Copy link
Contributor Author

I don't think it's the Tramp/Helm issue, and emacs --debug-init --timed-requires doesn't seem to be detailed enough:

File /usr/share/emacs/24.5/lisp/net/tramp-compat.elc: Required tramp-loaddefs: 127.329 sec
File /usr/share/emacs/24.5/lisp/net/tramp.elc: Required tramp-compat: 127.347 sec
File /home/tyria/.emacs.d/elpa/with-editor-20151111.418/with-editor.elc: Required tramp: 127.365 sec
File /home/tyria/.emacs.d/elpa/magit-20151120.748/magit.el: Required with-editor: 127.427 sec
File /home/tyria/.emacs.d/elpa/magit-20151120.748/magit-core.el: Required magit-process: 0.211 sec
File /home/tyria/.emacs.d/elpa/magit-20151120.748/magit.el: Required magit-core: 0.250 sec
File /usr/share/emacs/24.5/lisp/eshell/esh-cmd.elc: Required eldoc: 0.198 sec
File /usr/share/emacs/24.5/lisp/eshell/esh-mode.elc: Required esh-cmd: 0.223 sec
File /usr/share/emacs/24.5/lisp/eshell/eshell.elc: Required esh-mode: 0.299 sec
File /home/tyria/.emacs.d/elpa/magit-20151120.748/magit.el: Required eshell: 0.310 sec
File /home/tyria/.emacs.d/elpa/magit-annex-20151118.2102/magit-annex.elc: Required magit: 128.345 sec
File /home/tyria/.emacs.d/init.el: Required magit-annex: 128.349 sec
File /home/tyria/.emacs.d/elpa/helm-20151121.1244/helm-mode.elc: Required helm-files: 0.290 sec
File /home/tyria/.emacs.d/elpa/ranger-20151120.2237/ranger-autoloads.el: Required helm: 0.351 sec

I just updated to develop HEAD and it seems like there are a few regressions (All SPC o bindings are broken, for example, along with the ranger layer). Unfortunately I'm traveling so I don't have time to do detailed debugging.

@TheBB
Copy link
Contributor

TheBB commented Nov 22, 2015

That definitely sounds like the helm/tramp issue. You have tramp features that take almost exactly two minutes to load.

The SPC o binding is due to #3860. You should replace your calls to evil-leader/....

@darkfeline
Copy link
Contributor Author

Thanks, I put the Tramp fix in user-config instead of user-init, Spacemacs is starting up normally now.

Thanks for the evil-leader tip as well.

emacs --debug-init --timed-requires should probably be documented somewhere if it isn't already, If I remember correctly, Spacemacs intereferes with other Emacs profiling methods.

@mosic
Copy link
Contributor

mosic commented Dec 4, 2015

Maybe this should be a separate issue, but it would be nice if there was an automated way to test which layers are causing slowdowns.

I just went through all layers I had enabled in order to see what brought the startup time to about 3 seconds on my machine and I narrowed it to this:

  • ruby increases the startup time for about 0.6 seconds
  • spotify increases the startup time for about 0.3 seconds
  • themes-megapack increases the startup time for about 0.3 seconds

This means that the startup time goes from ~1.3 seconds without any layers to ~2.5 seconds with just these three enabled.

@mosic
Copy link
Contributor

mosic commented Dec 6, 2015

Update to my comment above using the latest commit (26ecdee) on develop: Today's changes to the ruby layer made it have a negligible impact on startup time. The two other layers add about 0.7 seconds.

Hope that's somewhat useful, it was a nice surprise to see the startup time drop today.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation ✏ stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

4 participants