fix(build): Optimize incremental builds with shared content graph hashing - #17630
Open
ericclemmons wants to merge 4 commits into
Open
fix(build): Optimize incremental builds with shared content graph hashing#17630ericclemmons wants to merge 4 commits into
ericclemmons wants to merge 4 commits into
Conversation
🦋 Changeset detectedLatest commit: a4ac9dc The changes in this PR will be included in the next version bump. This PR includes changesets to release 417 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Author
|
Closed in favor of #17632 so I can do a |
ericclemmons
marked this pull request as ready for review
August 11, 2026 18:00
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.
Changes
Optimizes experimental cache from O(R × G) to O(G × R) using a Merkle-style hashing algorithm to content roots that heavily share dependencies.
R= # of roots. (e.g. 8,000 content pages)G= graph size.flowchart LR subgraph Before["Before: O(R × G)"] P1["Entry 1"] --> G1["Walk graph"] P2["Entry 2"] --> G2["Walk graph"] P3["Entry 3"] --> G3["Walk graph"] end subgraph After["After: O(G + R)"] G["Analyze graph once"] --> H["Hash cache"] H --> R1["Entry 1: O(1) lookup"] H --> R2["Entry 2: O(1) lookup"] H --> R3["Entry 3: O(1) lookup"] endTesting
The performance degradation was discovered on my fork of cloudflare-docs where I enabled
incrementalBuild. ~10m builds now timed out at 30 minutes.Docs