Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using OS X 10.8 and lately I'm noticing that iTerm2 can sometimes be quite slow with opening a new shell. It takes around 5 seconds before I can do something. Might not seem a lot, but I work a lot in the shell so it can get pretty annoying.

I'm using ZSH with oh-my-zsh.

I've tried Terminal, uninstalling oh-my-zsh, clearing everything unnecessary from the startup files (.zshenv, .zlogin, .zprofile, .zshrc, .zlogout) and clearing the ASL-files in /var/log/asl and although it goes down a bit (like 0.20s), there's nothing that brings it down to pretty instantaneous or even below 3.0s.

Does anyone happen to have another idea?

share|improve this question
    
Related questions: 31403, 41743, 236953, 444614 – user495470 Nov 30 '12 at 14:22
    
Have you tried changing the command for new shells to something like login -pfq username /usr/local/bin/zsh? – user495470 Nov 30 '12 at 14:23
    
@lauri-ranta: Tried everything in those other threads, but to no avail. Trying "login -pfq username /usr/local/bin/zsh" did nothing as well. – Dimitri Nov 30 '12 at 15:53
    
To see if it is shell- or iTerm2 related: how much time does it take to start a new shell? (by entering zsh in an already open terminal window)? – Matteo Jan 5 '13 at 16:13
    
add to .zshrc : [ $((RANDOM & 1)) -eq 0 ] && do not sleep 5 – theoden Aug 11 '15 at 14:04

Clear log in /var/log/asl, i.e.,

rm -rf /var/log/asl/*.asl
share|improve this answer
    
Could you explain WHY iterm is being slowed down by this log folder and is there anything that can be done to actually stop this problem from happening? – David Aug 11 '14 at 19:56
    
@david you can check this link for understanding the reason why new tabs are slow. apple.stackexchange.com/a/71930/89583 – Archan Mishra Aug 11 '15 at 5:17
    
Wow --- thank you so much --- for iterm2 it seems that the answer is to use the suggestion at the bottom of that page (/bin/bash -il ) from the guy who got downvoted to -1. Works great. – David Aug 11 '15 at 13:58

Per comment from Archan Mishra above, for iTerm 2 the answer is to set up a custom terminal command /bin/bash -il which bypasses searching those logs completely. iterm2 opens instantly now.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.