Profiling ZSH: How I made my shell start 90% faster

Over the years, my .zshrc has grown to include many tricks & tools I rely on daily. But it also meant that my shell took a fair amount of time to start up, around 1 second: 1 2 3 $ time zsh -i -c exit ... zsh -i -c exit 0.31s user 0.14s system 47% cpu 0.949 total One second may not sound like a lot, but it meant that every time I opened a new terminal tab, my shell prompt wouldn’t show up until after I started typing....

July 18, 2024 · 9 min · Kian Kasad