You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Significant Zsh startup delay after adding gh copilot alias #9950
After adding eval "$(gh copilot alias -- zsh)" to my $HOME/.zshrc, I've noticed a significant slowdown in Zsh startup time. This severely impacts the terminal user experience, as every new session takes noticeably longer to become responsive.
Environment
gh --version: gh version 2.62.0 (2024-11-14)
Chip: Apple M4 Pro
Operating System: macOS 15.1.1 (24B2091)
Terminal Emulator: iTerm2 Build 3.5.10
Shell: zsh 5.9 (arm64-apple-darwin24.0)
Steps to reproduce the behavior
Add eval "$(gh copilot alias -- zsh)" to $HOME/.zshrc.
To reproduce and get some insights, I modified the aliasing command a bit:
eval"$(GH_DEBUG=api gh copilot alias -- zsh)">>$HOME/.zshrc
This showed me that, on startup, we are making an api call to https://api.github.com/repos/github/gh-copilot/releases/latest to check for the latest version of copilot. It looks like this call is happening at the beginning of every gh copliot command and is likely the cause of the latency. When there's a degraded api state, the booting of zsh, or any other terminal for that matter, will slow.
Extension version checking is relatively new, and this is a known pain-point. The linked PR should provide a fix for this, I think 👍
Activity
jtmcg commentedon Nov 22, 2024
Hey @aofei, thanks for bringing this up.
To reproduce and get some insights, I modified the aliasing command a bit:
This showed me that, on startup, we are making an api call to https://api.github.com/repos/github/gh-copilot/releases/latest to check for the latest version of copilot. It looks like this call is happening at the beginning of every
gh copliotcommand and is likely the cause of the latency. When there's a degraded api state, the booting ofzsh, or any other terminal for that matter, will slow.Extension version checking is relatively new, and this is a known pain-point. The linked PR should provide a fix for this, I think 👍
Relates to #9934
jtmcg commentedon Nov 22, 2024
Also, apparently we have a related issue in the gh-copilot repo