Slow to show first terminal at startup... not logs, not shell, not prefs?

47 views
Skip to first unread message

Daniel Aharon

unread,
Mar 7, 2022, 9:19:35 AMMar 7
to iterm2-discuss
It must have been a couple of months ago that I noticed that the time for my first terminal to appear had increased from insignificant to 8+ seconds. In looking for a solution, I timed my zsh login scripts and eventually switched to an empty bash shell: the shells all start without hesitation: the problem appears to happen before the first shell is initialized. Subsequent shells start immediately. I deleted the asl logs, deleted iTerm2 and deleted the prefs file. Now I have what appears to be a vanilla copy of iTerm2 with default settings and... it still takes 8 seconds to start.
I tried enabling the debug log, but the toggle does not seem to persist across a quit/run, plus I can't really tell what I'm looking at.
Anyone have ideas at what could be in play here? The system is untaxed, 8 cores sitting idle, lots of free RAM, all other programs have no delays.

George Nachman

unread,
Apr 3, 2022, 3:00:41 PMApr 3
to iterm2-...@googlegroups.com
So the window appears immediately but just sits empty for a while?
If you add an echo statement to your first dot file (.profile or whatever) does that show up right away?

--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iterm2-discuss/c099cbef-2782-4932-acd7-4a1f5b3aa3c9n%40googlegroups.com.

Daniel Aharon

unread,
Apr 3, 2022, 10:32:28 PMApr 3
to iterm2-...@googlegroups.com
No, it's that I click the icon to run iTerm2 but it takes 8 seconds for the first terminal to appear. As soon as it appears, all my good zsh config loads very quickly and the shell auditing script can report that nothing shell-related was slow.

I just noticed that the moment I run iTerm2, its menus populate to the Mac menubar in an instant, and the menus are also immediately able to give a slight cosmetic response to mouse clicks, but no menu items are available to drop-down until the exact moment that the first terminal appears, 8 seconds later: then everything comes alive.
It looks to me that the delay happens between menubar-loading and drawing first terminal, and I can't see into that time to debug.
> You received this message because you are subscribed to a topic in the Google Groups "iterm2-discuss" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/iterm2-discuss/BqT50ZprYEY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to iterm2-discus...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/iterm2-discuss/CAB5RqonLOAd1%3DiHZZOMxyHBU1%2BdTQfFJJ2ybKOBuMSRVVcYDqA%40mail.gmail.com.



--
Daniel Aharon, Technology Director
Vy Corporation
5 Great Valley Parkway, Suite 210
Malvern, PA 19355
610-225-0498 x101
daniel...@vycorporation.com

This electronic mail transmission contains confidential information intended only for the person named. Any use, distribution, copying or disclosure by another person is strictly prohibited.

George Nachman

unread,
Apr 5, 2022, 12:37:59 AMApr 5
to iterm2-...@googlegroups.com
Turn on Prefs > Advanced > Start debug logging automatically when iTerm2 is launched. Then launch the app and after the 8 second delay is over turn off iTerm2 > Toggle debug logging and send me /tmp/debuglog.txt

File an issue at https://iterm2.com/bugs and attach that file. Hopefully it will reveal the nature of the problem.

Daniel Aharon

unread,
Apr 6, 2022, 8:48:02 AMApr 6
to iterm2-discuss
The fix you pushed cut the delay till first window in half, to 4 seconds. Deleting all prefs and ~/.iterm2 shaves off another second. This is awesome, and I thank you. Time to close after Command-Q is still 4 seconds. Is that typical, or can anyone identify choices in prefs that would slow a  Quit? This would now be a default, that maybe I could toggle?
Reply all
Reply to author
Forward
0 new messages