Skip to content

perf: parallelize gw status git calls (2.65x faster) - #36

Merged
jondeibel merged 3 commits into
mainfrom
optimize-status
Mar 9, 2026
Merged

jondeibel merged 3 commits into
mainfrom
optimize-status

Conversation

@jondeibel

Copy link
Copy Markdown
Owner

Summary

  • Parallelize git subprocess calls in gw status using new Git::spawn/collect methods. All 5 git calls now run concurrently instead of sequentially. status --porcelain (~350ms in large repos) overlaps with merge-base, log, rev-list, and for-each-ref.
  • Update shell completions for zsh, bash, and fish with missing commands: status, diff, split, mcp-setup, and config set-delete-on-merge.
  • Add criterion benchmark for gw status to track performance.

Performance

Tested on Webflow repo (355k commits, 2.6GB .git):

Before After
gw status 1040ms 393ms

Criterion benchmark (small test repo): 136ms → 81ms

Test plan

  • All 156 existing tests pass
  • gw status output unchanged on webflow repo
  • Benchmark runs: cargo bench --bench status_bench
  • Completions verified: gw completions zsh|bash|fish

jondeibel and others added 3 commits March 9, 2026 10:16
Add status, diff, split, mcp-setup commands and config
set-delete-on-merge subcommand to zsh, bash, and fish completions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Spawn all git subprocesses concurrently instead of running them
sequentially. status --porcelain (~350ms in large repos) now runs
in parallel with merge-base, log, rev-list, and for-each-ref.

Adds Git::spawn/collect for non-blocking subprocess management.

Webflow repo (355k commits): 1040ms -> 393ms (2.65x faster)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Benchmarks full CLI invocation with a 3-branch stack to track
status command performance across changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jondeibel
jondeibel merged commit 823abac into main Mar 9, 2026
1 check passed
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