Repository navigation
perf(github): read blobs through GraphQL in batches of fifty - #184
Merged
Merged
Conversation
A cold scan fetched every selected file with its own REST request. `Client::blobs` serves cached blobs without a request and reads the rest fifty to a GraphQL query, taking a GraphQL text only when it hashes to the SHA asked for; binary, truncated or mismatched blobs come through REST. GraphQL blobs are cached as their REST representation, so warm reads stay free either way.
… a refused credential - Only forty-hex SHAs go to GraphQL, which refuses a whole query for one malformed ID; others go straight to REST. - A 401 or 403 from GraphQL stops the read. Refusals, limits, transport failures and fixtures without the batch fall back to REST. - Cached blobs are looked up concurrently, and the engine's single-blob read goes through the same batch. - Tests cover batches past fifty, an errors payload and a refused credential.
This was referenced Nov 4, 2026
Merged
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.
Finding #3 from the speed survey. A cold scan fetched every selected file with its own REST request; grafana-sized repositories select hundreds.
Client::blobs(repo, shas): cached blobs (via perf(github): serve Git blobs by SHA from the cache without revalidating #183's immutable cache) need no request; the rest go through GraphQL, fiftyobject(oid:)lookups per query, run concurrently.Tests: the GitHub client test covers a verified text, a mismatched text and a binary blob (one GraphQL query, two REST reads), and a second read with no requests. The engine and CLI fakes now answer blob batches; the replay-based fixtures fall back to REST.