Skip to content

fix: SCIP generation should prime caches in parallel#21828

Merged
ChayimFriedman2 merged 1 commit intorust-lang:masterfrom
Wilfred:parallel_prime_caches_scip
Mar 16, 2026
Merged

fix: SCIP generation should prime caches in parallel#21828
ChayimFriedman2 merged 1 commit intorust-lang:masterfrom
Wilfred:parallel_prime_caches_scip

Conversation

@Wilfred
Copy link
Contributor

@Wilfred Wilfred commented Mar 16, 2026

Previously load_workspace_into_db() called parallel_prime_caches() with a worker count of 1. This made SCIP generation slower than it needed to be.

On my M4 Macbook Pro this reduces the time taken to generate SCIP for rust-analyzer from ~39 seconds to ~35 seconds.

AI disclosure: Partially written with Claude Opus 4.6.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 16, 2026
@ChayimFriedman2
Copy link
Contributor

FWIW I don't like this change. I believe the default behavior should be conservative, and if SCIP wants to control cache priming it should set config.prefill_caches = false and prime them itself, likely with a config for the number of threads.

Actually maybe we should get rid of config.prefill_caches completely... Though it's a breaking change.

Previously load_workspace_into_db() called parallel_prime_caches()
with a worker count of 1 unconditionally. This made SCIP generation
slower than it needed to be.

Instead, pass the number of workers explicitly, and allow the SCIP
subcommand to specify the number of workers from the CLI, defaulting
to the number of physical CPUs.

On my M4 Macbook Pro this reduces the time taken to generate SCIP for
rust-analyzer from ~39 seconds to ~35 seconds.

AI disclosure: Partially written with Claude Opus 4.6.
@Wilfred Wilfred force-pushed the parallel_prime_caches_scip branch from a3e7837 to 84b3747 Compare March 16, 2026 14:09
@Wilfred Wilfred changed the title fix: load_workspace_into_db() should prime caches in parallel fix: SCIP generation should prime caches in parallel Mar 16, 2026
@Wilfred
Copy link
Contributor Author

Wilfred commented Mar 16, 2026

OK, I've changed it to a CLI argument for the SCIP subcommand. Does this look sensible, or do you want me to push cache priming into the SCIP entry point?

Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChayimFriedman2 ChayimFriedman2 added this pull request to the merge queue Mar 16, 2026
Merged via the queue into rust-lang:master with commit c6b7da6 Mar 16, 2026
17 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 16, 2026
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.

3 participants