Tell me more ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

When I press CMD+N in iTerm2 to bring up a new iTerm window, sometimes it takes 10 seconds before I get my prompt. If I immediately repeat the process, the whole thing takes 1 second. To me this implies it is a slow read of a file that is then cached in memory. I put a timing statement in my .bash_profile and that takes about one second, so it is not something I have manually and intentionally done to slow it down.

How should I find out where the time is spent during the shell/terminal initiation?

I tried running sudo fs_usage -f filesys > fsusage.txt and then searching for login and bash and iTerm in the resulting file, but have not been able to determine what might cause the delay there.

share|improve this question
Have you tried changing the login command to login -pfq username? (The symlink hack is not needed for iTerm.) – Lauri Ranta Feb 10 at 14:49
Searching through the fsusage.txt captured above it appears that the HomeBrew bash_completion file is taking several seconds to load... – mankoff Feb 11 at 17:43

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.