It seems like my shell is taking way too long to start up. Is there any way to profile it so I can figure out what's slowing it down so much?
Join Stack Overflow to learn, share knowledge, and build your career.
|
Try adding this at the beginning of the file:
and this at the end:
And you should get a detailed log showing the epoch_second.nanosecond time of the execution of each line. Note that GNU Edit: added comments Edit 2: If you have zsh 4.3.12 or later, you should be able to set
which should work on both Linux and OS X to give you nanosecond precision. |
|||||||||||||||||||||
|
|
You can start your timer at the first suspicious point in your
This alerts me if ever I see a too-slow startup, and I leave it in as a permanent wrapper. For more sophisticated measurements, there is a zsh module called More info in When I find things that are particularly slow (rbenv init, vcs_info check-for-changes, antigen, nvm, zsh-mime-setup, interpreter version checking, etc) I add |
||||
|
|