Profiling zsh: a Python plugin was adding 190 ms to every command
After fixing tmux, I looked at the shell running inside it. My zsh config had grown over a few years to about 30 plugins and Oh My Zsh snippets on top of zinit and Powerlevel10k. It felt a little heavy, but nothing stood out.
Measured properly, it was slow in three separate ways, each with its own cause:
| before | after | |
|---|---|---|
| startup to a usable shell | 267 ms | 101 ms |
| added to every command | 188 ms | 3 ms |
| added to every prompt | 15 ms | 4 ms |
This post covers how I measured each one, the fixes, and how I checked that the fixes didn’t change anything else. That check caught two mistakes of my own.



