Drawback
On my new M3 Mac Professional (36 GB RAM) operating macOS Sequoia 15.3.2, launching a brand new interactive shell in each the constructed‑in Terminal.app and the GPU‑accelerated Ghostty takes orders of magnitude longer than on my Linux/Home windows packing containers. I regularly use tmux, and spawning new panes can take > 1 second, whereas on Linux/Home windows it’s < 0.03 s.
What I’ve Tried
-
Stripped-down
~/.zshrc
- Disabled ALL plugins; nonetheless see preliminary startup ~1.2 s and subsequent ~0.1–0.2 s.
-
Customized timing operate:
timezsh () {
shell=${1-$SHELL}
for i in $(seq 1 10); do
/usr/bin/time $shell -i -c exit
carried out
}
Outcomes (no plugins):
actual 1.24; consumer 0.10; sys 0.05
actual 0.15; consumer 0.04; sys 0.03
actual 0.13; consumer 0.03; sys 0.03
actual 0.14; consumer 0.03; sys 0.03
With plugins enabled:
-
compinit tweaks & zprof evaluation
- Precompiled cache, eliminated previous dump recordsdata, no important enchancment.
-
Homebrew & some cli instruments additionally really feel sluggish, suggesting a deeper system subject.
Setting
- macOS: Sequoia 15.3.2
- {Hardware}: Apple M3 Professional, 36 GB RAM
- Shells examined:
/bin/zsh
(default)/bin/bash
- Measurement software:
/usr/bin/time
andzprof
Questions
Has anybody noticed 1-2 second chilly startup on an M3 Mac for Zsh, even with minimal config?
Are there identified system-wide elements (e.g. Rosetta layers, filesystem checks, notarization delays) that might decelerate each new shell occasion?
How can I diagnose what’s occurring throughout that 1 second (e.g. tracing dynamic libraries, file-system stalls)?
Any tweaks or workarounds to get terminal/spawn instances nearer to < 0.1 s?
Thanks prematurely for any insights!
EDIT:
After utilizing zcomet as an alternative of zinit and p10k as an alternative of starship. I feel the difficulty is usually linked to chilly begin vs. heat begin of the terminal. If all the things is cached, the startup time is within the ball park of 5ms which is okay. However the chilly begin of the terminal after the current os replace is 2-6 seconds and actually annoying. I additionally considered a silly means of simply opening a terminal within the background with a cron job, however the terminal is not a tty and due to this fact not helpful. Any concepts how I can cut back the chilly begin time or maintain the terminal additionally "heat"?