11

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?

  • Related questions: 31403, 41743, 236953, 444614 – Lri 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? – Lri 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
16

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

rm -rf /var/log/asl/*.asl
  • 1
    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
  • 2
    @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
11

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 the system ASL logs completely. iterm2 opens instantly now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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