Tech News
← Back to articles

Speeding up my ZSH shell

read original related products more articles

Super quick one I want to document here! I got myself on a side quest, again! No biggie, my ZSH shell was taking ages to load. When I say ages, more like 5+ seconds every time I opened a new terminal, that sort of thing can add up. This is just something I’ve lived with over the years, nothing has prompted this other than me wondering why it’s slow, then searching for how to profile it.

So, what’s actually slowing things down? Zsh comes with this super handy profiling tool called zprof . Here’s how to use it:

zmodload zsh/zprof zprof

This give a load of output, but it’s a good starting point.

I had no idea this existed so massive shout out to Jacek’s Blog for this tip!

When I ran the profiler, here’s what I found:

1 ) _omz_source 55.73 % 2 ) compinit 30.76 % 3 ) syntax-highlight 14.63 %

So, Oh-My-Zsh was taking up over half the startup time!

According to JonLuca’s research, this can cut the load time in half! The auto-updates are nice, but I’d rather do them manually when I want to.

DISABLE_AUTO_UPDATE = "true" DISABLE_MAGIC_FUNCTIONS = "true" DISABLE_COMPFIX = "true"

... continue reading