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 spacemacs #48

Closed
amosbird opened this Issue Sep 27, 2017 · 7 comments

Comments

Projects
None yet
6 participants
@amosbird
Copy link

amosbird commented Sep 27, 2017

Hi, how can I use esup to profile spacemacs' start time? Currently I got

ERROR: the child emacs had the following errors:
  ERROR(profile-sexp) at /home/amos/.emacs.d/init.el:22: (wrong-type-argument stringp nil)

Results will be incomplete due to errors.


Total User Startup Time: 0.000sec     Total Number of GC Pauses: 0     Total GC Time: 0.000sec

init.el:17  0.000sec   33%
(setq gc-cons-threshold 100000000)

init.el:19  0.000sec   33%
(defconst spacemacs-version          "0.200.9" "Spacemacs version.")

init.el:20  0.000sec   33%
(defconst spacemacs-emacs-min-version   "24.4" "Minimal version of Emacs.")

@jschaf

This comment has been minimized.

Copy link
Owner

jschaf commented Sep 28, 2017

I haven't managed to get esup working on spacemacs, which was annoying since I used up until recently. I'm unsure of the root cause. It's likely related to some of the other bugs about esup choking on .elc files.

@adamkruszewski

This comment has been minimized.

Copy link

adamkruszewski commented Nov 14, 2017

The same happens with Doom Emacs even with all .elc files deleted:

ERROR: the child emacs had the following errors:
  ERROR(profile-sexp) at /home/adam/.emacs.d/init.el:34: (wrong-type-argument stringp (concat user-emacs-directory core/core))

Results will be incomplete due to errors.

the line esup is bailing out is:

(require 'core (concat user-emacs-directory "core/core"))
@agzam

This comment has been minimized.

Copy link

agzam commented Feb 22, 2018

Guys. you can profile Spacemacs just fine, it adds a few additional command line options:

  • --profile will display profiling information on startup
  • --timed-requires will display the time taken by each require commands
@karlicoss

This comment has been minimized.

Copy link

karlicoss commented Feb 25, 2018

Also, the unobvious thing about --timed-requires -- it creates a buffer (*load-times*), but it might stay in background, so you have to switch to it. Took me a while to realize.

@jschaf

This comment has been minimized.

Copy link
Owner

jschaf commented Mar 25, 2018

This is probably because esup doesn't handle the case where a path is provided as the second arg for require. I just created a whole new test suite, so tackling this will be much easier.

@jschaf jschaf closed this in 9d13e8c Mar 25, 2018

@jschaf

This comment has been minimized.

Copy link
Owner

jschaf commented Mar 25, 2018

Should be fixed. Please re-open if not.

Guys. you can profile Spacemacs just fine, it adds a few additional command line options:

Right, but if you a slow line in a file, the require just narrows it down to the file. The goal of esup is to provide sexp-level profiling info.

@aaronjensen

This comment has been minimized.

Copy link

aaronjensen commented Apr 25, 2018

Hm, when I esup spacemacs (on Emacs 27) I only see traces of diff-mode.elc and vc-get.elc and very low startup time:

Total User Startup Time: 0.006sec Total Number of GC Pauses: 0 Total GC Time: 0.000sec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment