Skip to content

perf: optimize shell startup with compinit caching, zwc bytecode, and zsh-defer#24

Merged
sha1n merged 2 commits into
masterfrom
perf/shell-startup
Mar 25, 2026
Merged

perf: optimize shell startup with compinit caching, zwc bytecode, and zsh-defer#24
sha1n merged 2 commits into
masterfrom
perf/shell-startup

Conversation

@sha1n

@sha1n sha1n commented Mar 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Cache compinit dump file and skip regeneration when fresh (<24h)
  • Compile zsh source files to .zwc bytecode for faster sourcing
  • Defer non-critical plugins (zsh-autosuggestions, zsh-syntax-highlighting, zsh-history-substring-search) via zsh-defer
  • Add zsh_bench script for measuring shell startup time
  • Add make compile / make clean_zwc / reload! for bytecode management
  • Add .benchmarks/ to global gitignore

Test plan

  • Run make test to verify nothing is broken
  • Run zsh_bench to confirm startup benchmarking works
  • Open a new shell and verify deferred plugins load correctly (autosuggestions, syntax highlighting, history search)
  • Run make compile and make clean_zwc to verify bytecode lifecycle

🤖 Generated with Claude Code

@sha1n sha1n force-pushed the perf/shell-startup branch from a359395 to 0aed254 Compare March 25, 2026 16:58
@sha1n sha1n enabled auto-merge (rebase) March 25, 2026 16:59
@sha1n sha1n merged commit 05a1e4f into master Mar 25, 2026
2 checks passed
@sha1n sha1n deleted the perf/shell-startup branch March 25, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant