Just my zsh dots : P
Designed to be as fast as humanly possible (benchmarked with zsh-bench), while having every single plugin you could need.
Clone this to ~/.config/zsh using
git clone --recursive https://github.com/Magniquick/zsh-dots ~/.config/zshand create/appened to /etc/zshenv (or /etc/zsh/zshenv, depending on your distro) the the following -
export ZDOTDIR="$HOME"/.config/zshafter that, run
zsh_setupto setup optional theming, compiling, and other stuff.
Necessary - fzf.
Optional - atutin, and preferably kitty/iTerm2.
Open a issue, add the output of $TERM_PROGRAM and which format is used by your terminal on https://github.com/hzeller/timg to add image preview support there. Alternatively, add it to lessfilter and open a pr !
Happy hacking !
| Scenario | Description | Mean (ms) | Notes |
|---|---|---|---|
| baseline | Full config with env.zsh, zsh_plugins.zsh, random.zsh, zoxide, and atuin |
96.7 ± 1.4 | Reference run with no .zwc cache |
| no env/random | Skip env.zsh + random.zsh (so the plugin stack and codex completion are disabled) |
27.1 ± 0.3 | The big ~70 ms chunk comes from the plugin stack |
| no env/random/zoxide | Also skip zoxide initialization |
25.1 ± 0.2 | Tiny additional gain from delaying the auto-completion hook |
| no env/random/zoxide/atuin | Plus disable the atuin block (autosuggestions strategy) |
17.2 ± 0.2 | Autosuggestions now take the measurable remainder, leaving ~7 ms of other hooks |
--no-rcs |
Zsh without any dotfiles | 10.0 ± 0.2 | Baseline shell cost without your configuration |
So the residual ~85–90 ms runtime is mostly env/zsh_plugins → instant prompt → compinit/completion/zsh plugin stack, with codex completion, zoxide, and atuin making smaller but measurable contributions. Skipping those pieces (or lazily loading them) is what brings you closest to the --no-rcs number.
zsh-smartcache is now loaded from plugins/zsh-smartcache, and the heavy eval calls (codex completion zsh, zoxide init zsh, atuin init zsh --disable-up-arrow) go through smartcache eval …. Cache files live inside ~/.cache/zsh, and they are kept in sync in the background so subsequent shells instantly reuse the cached output without rerunning the commands.
Measured with ZDOTDIR=/home/magni/.config/zsh zsh -f -c 'zmodload zsh/zprof; source $ZDOTDIR/.zshrc; zprof'.
| Function / block | Time (ms) | Share |
|---|---|---|
_zsh_highlight_bind_widgets |
14.6 | 30% |
compinit |
13.1 | 27% |
enable-fzf-tab |
10.5 | 22% |
kitty-integration |
4.0 | 8% |
add-zle-hook-widget / add-zsh-hook |
~2.0 | 5% |
| other helpers (autosuggestions, fast-syntax-highlighting, fzf tab helpers) | <1 | ~2% |
Total of the profiled functions adds up to about 45 ms; the rest of the ≈80 ms headroom is the cost of launching zsh + sourcing env.zsh/zsh_plugins.zsh before zprof even starts recording.