A zsh plugin that caches the output of binary initialization commands to significantly reduce shell startup time.
evalcache is a zsh plugin that caches the output of binary initialization commands to reduce shell startup time. It works by replacing `eval` commands with `_evalcache`, storing the static output in a file for future use, which eliminates the overhead of repeatedly executing the same initialization scripts.
Developers using zsh who rely on tools like rbenv, hub, or scmpuff and want to optimize their shell startup performance, especially those who frequently open new terminal tabs or sessions.
It provides a simple, non-intrusive way to shave milliseconds off shell startup by caching static initialization output, with minimal configuration and graceful fallback behavior if tools are removed.
:hatching_chick: zsh plugin to cache eval loads to improve shell startup time
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks in the README show up to 88% reduction in initialization time for tools like rbenv, making subsequent shell startups much faster.
If a tool is uninstalled, evalcache automatically becomes a no-op, preventing errors and ensuring compatibility without manual intervention.
Includes a convenience function `_evalcache_clear` to manually clear cached files, as documented, simplifying updates when needed.
Works out of the box with default settings, and environment variables like ZSH_EVALCACHE_DIR allow customization without complex setup.
Only caches static initialization commands; dynamic or time-sensitive outputs may become stale, requiring manual cache clearing and potentially causing issues.
Primarily optimized for specific tools like rbenv, hub, and scmpuff; it offers less benefit for other initialization patterns or custom scripts.
Users must remember to clear caches after tool updates, as there's no automatic invalidation, which can lead to outdated configurations if overlooked.