Skip to content

Create the previous dep graph index on a background thread#116375

Closed
Zoxc wants to merge 1 commit intorust-lang:mainfrom
Zoxc:lazy-index
Closed

Create the previous dep graph index on a background thread#116375
Zoxc wants to merge 1 commit intorust-lang:mainfrom
Zoxc:lazy-index

Conversation

@Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Oct 3, 2023

This changes SerializedDepGraph.index to be computed on-demand per dep kind. This means we can immediately start using queries without waiting for the entire index to be constructed. Additionally a background thread is started which computes the entire index, effectively off-loading most of the index construction to the background thread.

BenchmarkBeforeAfterBeforeAfter
TimeTime%MemoryMemory%
🟣 clap:check:unchanged0.4259s0.4225s -0.79%89.65 MiB90.08 MiB 0.48%
🟣 hyper:check:unchanged0.1425s0.1417s -0.53%47.85 MiB47.91 MiB 0.13%
🟣 regex:check:unchanged0.3188s0.3157s -0.97%71.09 MiB71.58 MiB 0.69%
🟣 syn:check:unchanged0.5895s0.5813s💚 -1.38%101.68 MiB102.15 MiB 0.47%
🟣 syntex_syntax:check:unchanged1.4392s1.4361s -0.22%200.62 MiB201.68 MiB 0.53%
Total2.9158s2.8974s -0.63%510.89 MiB513.40 MiB 0.49%
Summary1.0000s0.9922s -0.78%1 byte1.00 bytes 0.46%
BenchmarkBeforeAfterBeforeAfter
TimeTime%MemoryMemory%
🟠 clap:debug:unchanged1.0753s1.0684s -0.64%142.80 MiB142.72 MiB -0.05%
🟠 hyper:debug:unchanged0.2857s0.2847s -0.35%63.06 MiB63.15 MiB 0.13%
🟠 regex:debug:unchanged0.7703s0.7633s -0.90%108.76 MiB109.03 MiB 0.25%
🟠 syn:debug:unchanged1.0596s1.0531s -0.62%142.08 MiB142.18 MiB 0.07%
🟠 syntex_syntax:debug:unchanged2.7530s2.7274s -0.93%308.92 MiB308.63 MiB -0.09%
Total5.9438s5.8969s -0.79%765.62 MiB765.71 MiB 0.01%
Summary1.0000s0.9931s -0.69%1 byte1.00 bytes 0.06%

r? @cjgillot

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) perf-regression Performance regression. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.