Repository navigation
perf(engine): reuse config and extraction for a commit whose read files are unchanged - #186
Merged
Merged
Conversation
…es are unchanged The extraction and config caches were keyed by commit, so any push, even one touching only code, re-evaluated Pkl and re-scanned every manifest. Both are functions of the files they read, so each now also has a cache keyed by the content of those files, under the same namespace as the commit key. A new commit still reads the tree and the selected files, now from the blob cache, and the path inventory and unsupported list still come from the current tree.
Unlike a commit, the same files recur across releases, so a release that changes decoding or extraction without a namespace bump would keep reading stale entries.
sweepies
force-pushed
the
perf/content-addressed-extraction
branch
from
November 4, 2026 15:24
74d3624 to
b91d9de
Compare
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 #1 from the speed survey: a saved scan was reused only when the commit was unchanged, so every push, even one touching only code, re-evaluated Pkl and re-scanned every manifest.
Both steps are pure functions of their inputs, so each now also has a content-addressed cache:
load_filesoverpatchula.pkland its imports, keyed by repository and the hash of the gathered modules.scanner.extract(&files), keyed by repository, config hash and the hash of the files map: the selected blobs, the unreadable-settings markers and whatevermore()pulled in. It uses the sameextract-v25namespace as the commit key, so a semantics bump invalidates both.The commit-keyed fast path is unchanged. On a new commit the engine reads the tree and rebuilds the files map; with #183 and #184 unchanged blobs come from the local cache, so the network cost is one tree request. The path inventory and unsupported-file list always come from the current tree.
Soundness: the reused value is the output of a deterministic function of exactly the hashed input, so no path list or read set has to be tracked.
Test: a dry run, then the head moves to a new commit with the same tree. The second run reports the new commit, one extraction hit, the same dependencies and updates, and no blob reads over REST or GraphQL.