Async vs Synchronous Git Status in Oh My Zsh: Choosing Responsiveness or Accuracy Under Concurrent Shell Load
25.5K reputation · 24 May 2025, 05:30 UTC
Goal: Minimize prompt latency caused by concurrent git status checks across multiple terminal windows while preserving up‑to‑date repository information in the ohmyzsh prompt.
Constraint: Enabling the git plugin’s asynchronous mode (OH_MY_ZSH_GIT_STATUS_ASYNC) keeps the prompt responsive but may show stale status when repositories change quickly; disabling it forces synchronous checks that guarantee accuracy but introduce noticeable delay, especially when many shells invoke git simultaneously. Ohmyzsh does not provide a native mechanism to limit concurrent git invocations between sessions, so latency spikes can appear under heavy concurrent load.
Uncertainty: It is unclear whether applying an external throttling wrapper to git calls, switching to a lighter vcs_info‑based prompt, or tuning the async timeout offers a better trade‑off between responsiveness and accuracy for users who run many parallel shells.
- Which combination of async mode, throttling, or alternative vcs_info yields the lowest observable latency without sacrificing status correctness?
- Can a lightweight vcs_info configuration replace the git plugin’s async behavior while keeping the prompt accurate under concurrent use?
- Is there a practical way to limit concurrent git processes across terminal sessions without modifying ohmyzsh core?