Repository navigation
perf(github): fetch clone PR refs over https and split review reads - #49
Merged
Merged
Conversation
- Fetch a pull request's refs into a clone over HTTPS with the GitHub token, falling back to the clone's remote. An SSH remote cost about two seconds more per fetch. - Read review metadata and review threads in two GraphQL queries at once rather than one heavier query. - Read a signed-out overview's pull request and comments at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
seatedro
added a commit
that referenced
this pull request
Nov 3, 2026
perf(github): fetch clone PR refs over https and split review reads
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Follow-up to #48, aimed at the GitHub calls still waited on after that PR.
git fetchevery time. The PR refs were fetched through the clone's remote, which is often SSH. Each SSH connection to GitHub costs about 2 s more than HTTPS (git ls-remote: 2.66–2.87 s over SSH, 0.69–0.75 s over HTTPS).-Zllvm-tpdeflag torustc_codegen_llvmrust-lang/rust#164108.What changed
https://github.com/<owner>/<repo>.gitwith token auth. The token is passed through the environment, the same way the review cache does it. If that fetch fails, Diffy falls back to the clone's remote as before. Only Diffy's own PR refs are written, so remote-tracking branches are untouched./pulls/Nand/issues/N/commentsat the same time.Results
Timed by hand against GitHub:
seatedro/diffyPR in a clone with an SSHorigin(4 PRs × 2 rounds)The split review read returns the same data: 16 threads, 30 comments, metadata, 2 reviews and 14 checks.
Testing
cargo test --lib: 530 passed.cargo clippy --all-targets: no new warnings.