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
v0.61.0 introduced GitHub PR integration (#2781). On every startup and after every background fetch, lazygit now makes two GitHub GraphQL round-trips to fetch PR data. This adds ~600ms of overhead per refresh cycle — a 10x regression in post-fetch refresh time compared to v0.59.0.
There is no config option to disable this feature. It auto-activates if gh auth login has been run, which is true for most developers.
Reproduction
# Clone this repo (public, verifiable)
git clone https://github.com/jesseduffield/lazygit.git /tmp/lazygit-bench
cd /tmp/lazygit-bench
gh repo set-default jesseduffield/lazygit
# Run with debug logging
LOG_LEVEL=info lazygit --debug
# In another terminal, tail the log:# tail -f ~/Library/Application\ Support/lazygit/development.log | grep -E "Fetched|Refresh took|git fetch"
Measurements
Methodology: ran each version in tmux with --debug flag, let it fully initialize for 8 seconds, killed the session, then extracted durations from lazygit's own debug log (~/Library/Application Support/lazygit/development.log). 3 sequential runs per version on the same machine, tested on this repo.
Post-fetch refresh: ~575ms (v0.61.0) vs ~57ms (v0.59.0) — 10x slower.
Also confirmed on two private repos. The overhead is consistent (~250-350ms per GraphQL round-trip, 2 round-trips per refresh cycle) regardless of repo size or number of PRs returned.
git fetch --all completes → triggers sync refresh including pullRequests scope → PR fetch Correct gocui link #2 (~250ms)
The GraphQL round-trip is the bottleneck — even when fetching only 5 PRs, each call takes 250-430ms due to network latency. This runs on every refresh, not just startup.
Additionally, if remote.origin.gh-resolved is not set (which it isn't by default unless you run gh repo set-default), the PR fetch still takes ~300ms to fail and returns 0 PRs.
Suggestions
Add a config toggle (e.g. git.showPullRequests: false) — the original PR had one (enableGithubCli) but it was removed during review.
Cache PRs aggressively — skip re-fetching if the last fetch was < N seconds ago, especially on the post-git fetch refresh.
Don't fetch PRs if gh-resolved is not set — currently spends ~300ms failing silently.
Description
v0.61.0 introduced GitHub PR integration (#2781). On every startup and after every background fetch, lazygit now makes two GitHub GraphQL round-trips to fetch PR data. This adds ~600ms of overhead per refresh cycle — a 10x regression in post-fetch refresh time compared to v0.59.0.
There is no config option to disable this feature. It auto-activates if
gh auth loginhas been run, which is true for most developers.Reproduction
Measurements
Methodology: ran each version in tmux with
--debugflag, let it fully initialize for 8 seconds, killed the session, then extracted durations from lazygit's own debug log (~/Library/Application Support/lazygit/development.log). 3 sequential runs per version on the same machine, tested on this repo.v0.61.0 (current)
v0.59.0 (baseline, no PR feature)
Post-fetch refresh: ~575ms (v0.61.0) vs ~57ms (v0.59.0) — 10x slower.
Also confirmed on two private repos. The overhead is consistent (~250-350ms per GraphQL round-trip, 2 round-trips per refresh cycle) regardless of repo size or number of PRs returned.
Root cause
From the debug logs, the startup sequence is:
git fetch --allcompletes → triggers sync refresh includingpullRequestsscope → PR fetch Correct gocui link #2 (~250ms)The GraphQL round-trip is the bottleneck — even when fetching only 5 PRs, each call takes 250-430ms due to network latency. This runs on every refresh, not just startup.
Additionally, if
remote.origin.gh-resolvedis not set (which it isn't by default unless you rungh repo set-default), the PR fetch still takes ~300ms to fail and returns 0 PRs.Suggestions
git.showPullRequests: false) — the original PR had one (enableGithubCli) but it was removed during review.git fetchrefresh.gh-resolvedis not set — currently spends ~300ms failing silently.Environment