Skip to content

Avoid repeated source hashing for sibling local bundles - #1907

Merged
Brian Krabach (bkrabach) merged 1 commit into
mainfrom
simplify/startup-perf-20261111
Nov 11, 2026
Merged

Brian Krabach (bkrabach) merged 1 commit into
mainfrom
simplify/startup-perf-20261111

Conversation

@bkrabach

Copy link
Copy Markdown
Collaborator

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.

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