Repository navigation
perf(target-graph): deduplicate subgraph queue traversal - #1250
Merged
Elizabeth Craig (ecraig12345) merged 3 commits intoNov 5, 2026
Merged
Elizabeth Craig (ecraig12345) merged 3 commits into
Elizabeth Craig (ecraig12345) merged 3 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7b26a45b-25aa-45e3-95b4-f9a1b55dcb58
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the subgraph-extraction optimization.
No open issues 🎉
What changed in this PR
Optimizes Lage’s subgraph extraction as a self-contained part of the performance effort in #1238. The change avoids redundant queue work while preserving dependency edges, ordering, and priorities; external-dependency resolution is unchanged.
Changes:
- Replaces front removal with an index cursor and deduplicates targets when enqueued.
- Adds coverage for shared dependencies, duplicate/empty/missing entries, repeated extraction, source-graph immutability, cycles, and missing dependencies.
- Includes a Beachball patch release note.
| File | Description |
|---|---|
packages/target-graph/src/TargetGraphBuilder.ts |
Uses cursor-based traversal and prevents duplicate enqueues. |
packages/target-graph/src/__tests__/TargetGraphBuilder.test.ts |
Adds regression coverage for graph semantics and edge cases. |
change/change-63a47ed4-130c-40f3-b16a-7cddba3f7b29.json |
Records the target-graph performance improvement for a patch release. |
Review effort: Max
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7b26a45b-25aa-45e3-95b4-f9a1b55dcb58
Elizabeth Craig (ecraig12345)
approved these changes
Nov 5, 2026
Elizabeth Craig (ecraig12345)
merged commit Nov 5, 2026
39d417a
into
microsoft:main
14 checks passed
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.
Summary
Requested reviewers: Nemanja Tesic (@nemanjatesic) and Elizabeth Craig (@ecraig12345).
Use an index cursor for the subgraph traversal queue and mark targets when enqueued. This avoids repeated front removal and duplicate inspection requests while retaining all dependency edges and their ordering.
Part of the broader Lage performance effort explored in #1238. This change is self-contained and can merge independently. It affects only subgraph extraction, not external-dependency resolution.
Validation