Take the 2-minute tour ×
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.) –  ؘؘؘؘ Feb 10 '13 at 14:49
    
Searching through the fsusage.txt captured above it appears that the HomeBrew bash_completion file is taking several seconds to load... –  user588 Feb 11 '13 at 17:43

1 Answer 1

You should also check on the Console.app < system.log section if there's any error log that could lead you to discover the causes of the error.

Also, does Terminal behave the same? Have you tried to wipe iTerm's settings using an app like Appzapper to check if there's any problem with them?

share|improve this answer

Your Answer

 
discard

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