Repository navigation
Avoid repeated source hashing for sibling local bundles - #1907
Merged
Merged
Conversation
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.
When several local bundle files share a directory, profile preflight currently hashes that whole directory once per file, including on an already-qualified profile hit. Reuse one content observation per exact root within that check. Every declared path remains in the configuration identity, and the next check rescans so edits still require qualification. Source precedence, account binding, cancellation and generation admission are unchanged.
Measured on Linux ARM64/Python 3.13 with three local bundle files, 103 authored files (~3.3 MB), and 100,000 excluded dependency files: median preflight 3.544 s → 1.215 s across three observations. With no excluded files: 24.3 ms → 10.8 ms. All unchanged-input observations selected the same generation before and after. This exercises real preflight and index lookup with installer/freeze/probe fixture boundaries; it does not claim an end-to-end cold-profile or live-worker improvement.
Validation: 51 focused profile/preparation tests passed. The new regression fails on the original implementation and verifies sibling edits, independent roots and fresh checks. Independent source review completed. This change works with the existing Foundation version and adds no persistent cache or dependency update.