jschaf / esup

ESUP - Emacs Start Up Profiler
401 stars 21 forks source link

Profiling spacemacs #48

Closed amosbird closed 6 years ago

amosbird commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 6 years ago

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

karlicoss commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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