You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rust: Reuse the loaded workspace and load the next one in the background - #23335
↑ At this head: 26/26 extractor unit tests, fmt and clippy pass; unit tests cover reuse, failed loads, the two-workspace bound, background overlap and drop waiting for an in-flight load. ↑ At this head's extractor: the new proc-macro-workspaces fixture (two workspaces using a local proc macro) gives the same expected calls at 1 and 4 threads via CLI emulation. ↑ At 9c50707 (same layer-5 code, older lower layers): calls, macro expansions, files, diagnostics and archives matched the stack base on dependency-features, a broken/loose-file case and ripgrep+fd+bat at -j1/-j8; Rust integration CI passed on all platforms, Windows on rerun. ↓ Since 9c50707 the lower layers were restacked; parity and DCA were not rerun on this head. ↓ Platform CI on this head is pending, including the first CI run of proc-macro-workspaces.
Layer 5 of the Rust extractor performance stack, on top of #23333.
LoadedWorkspaces keeps the last loaded workspace and, when extracting with more than one thread, loads the next manifest in a background thread while the current one is extracted. At most two workspaces are alive at once, so two proc-macro server pools; the in-flight load is joined on drop.
Workspaces are only reused for the exact same ProjectManifest. There is no fingerprinting, and failed loads are not cached.
In each dependency round the manifests are sorted, so the order is deterministic and the workspace still loaded from the previous phase comes first. Each file is selected for a single manifest per round, so this order doesn't change what gets extracted.
There are fewer LoadManifest steps, because the last per-file workspace is no longer reloaded for dependency extraction (hence the workspace-with-glob expectation change).
Against layer 4 on ripgrep+fd+bat: 148/124/132s → 111/112/108s.
Whole stack against its base (6489640f): ripgrep 60.8 → 28.0s, ripgrep+fd+bat 185.8 → 107.4s (medians). User+sys time is unchanged; extractor peak RSS +8%.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Missing integration coverage for overlapping real workspace loads leaves interactions between proc-macro server pools and shared build artifacts unverified across threading, prefetch, and reuse.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Test overlapping loads sharing proc macros and build artifacts
rust/extractor/src/workspaces.rs:86
Please add an integration test for overlapping real workspace loads that share a procedural-macro dependency and build-script output, comparing extraction at one and multiple threads across prefetch and reuse. The new tests use a mock loader, while dependency-features exercises only macro_rules!, so neither checks interactions between the two proc-macro server pools and shared build artifacts.
Keeps the two most recently used workspaces, so that extracting dependencies
does not reload workspaces still in memory, and loads the next manifest while
the current one is extracted when running on more than one thread.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8d0772f66a6b42c7b59d25b5e8f4073d
Older workspaces were never reused during per-file extraction, and each
holds its own proc-macro server pool.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8d0772f66a6b42c7b59d25b5e8f4073d
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Overlapping Cargo loading and extraction share build artifacts while databases and proc-macro pools persist across phases, requiring human review of concurrency and resource-lifetime interactions.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Overlapping background Cargo loading with proc-macro extraction and retaining analyzer databases across dependency rounds creates shared-cache and process-lifetime interactions that require maintainer review.
No open issues 🎉
Review effort: Max (adaptive)
This branch has not been deployed
No deployments
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
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.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
8f6861cb4c3e94e14064540d5fcd8c93cf4fefe5↑ At this head's extractor: the new
proc-macro-workspacesfixture (two workspaces using a local proc macro) gives the same expected calls at 1 and 4 threads via CLI emulation.↑ At
9c50707(same layer-5 code, older lower layers): calls, macro expansions, files, diagnostics and archives matched the stack base ondependency-features, a broken/loose-file case and ripgrep+fd+bat at -j1/-j8; Rust integration CI passed on all platforms, Windows on rerun.↓ Since
9c50707the lower layers were restacked; parity and DCA were not rerun on this head.↓ Platform CI on this head is pending, including the first CI run of
proc-macro-workspaces.Layer 5 of the Rust extractor performance stack, on top of #23333.
LoadedWorkspaceskeeps the last loaded workspace and, when extracting with more than one thread, loads the next manifest in a background thread while the current one is extracted. At most two workspaces are alive at once, so two proc-macro server pools; the in-flight load is joined on drop.ProjectManifest. There is no fingerprinting, and failed loads are not cached.LoadManifeststeps, because the last per-file workspace is no longer reloaded for dependency extraction (hence theworkspace-with-globexpectation change).Cold
codeql database create --threads=8, interleaved pairs:6489640f): ripgrep 60.8 → 28.0s, ripgrep+fd+bat 185.8 → 107.4s (medians). User+sys time is unchanged; extractor peak RSS +8%.