-
Notifications
You must be signed in to change notification settings - Fork 150
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Slow straight bootstrap #726
Comments
Does the bootstrap process take that long when using |
No, it seems to run much faster. Running (straight-bug-report
:pre-bootstrap
(setq my//bootstrap-start (current-time))
:post-bootstrap
(message "Bootstrapping done in %.03fs"
(float-time (time-subtract (current-time) my//bootstrap-start)))
:user-dir "/tmp/straight.el-test"
:preserve t) the second time takes 0.1 to 0.2 seconds. This might be a bug in Radian then. Is there a more verbose mode of straight that I can enable to get diagnostics of what straight is doing? |
In this situation I would recommend using Emac's elisp profiler: https://www.gnu.org/software/emacs/manual/html_node/elisp/Profiling.html You could advise (defun +straight-profile-use-recipes (advised recipe)
(let ((melpa (eq (car recipe) 'melpa)))
(when melpa (profiler-start 'cpu+mem))
(prog1
(funcall advised recipe)
(when melpa (profiler-stop)))))
(advice-add #'straight-use-recipes :around #'+straight-profile-use-recipes) This will add the advice and start the profiler when the Then after init, you can Does that help? |
Thank you! This is a really nice way to profile. I found out that the reason is that |
Right, see https://github.com/raxod502/straight.el/tree/e1390a933b6f5a15079d6dec91eac97a17aad10c#summary-of-options-for-package-modification-detection. There are tradeoffs between startup time, reliability of modification detection, and number of system dependencies for the different strategies for modification detection. See also #694 (comment), in @progfolio came up with an idea that might be able to get all the advantages without any real downsides. |
How long is bootstrapping straight expected to take?
Right now it is taking an average of 1.7 seconds on my machine (compared to the rest of my config which takes less than 0.5 seconds). I benchmarked
bootstrap.el
and it seems that executing these lineshttps://github.com/raxod502/straight.el/blob/e1390a933b6f5a15079d6dec91eac97a17aad10c/bootstrap.el#L82-L84
Takes an average of 1.6 seconds.
Is this expected? If so, is there a way to speed this up?
The text was updated successfully, but these errors were encountered: