aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/nameres/tests.rs
diff options
context:
space:
mode:
authorMichal Terepeta <[email protected]>2020-01-06 21:06:01 +0000
committerMichal Terepeta <[email protected]>2020-01-06 21:21:56 +0000
commitbe967b94e15f238a6fe806e93359e302c43d0e45 (patch)
tree6a28cc8aa0172f54b0a0e659b9f45eca7aac7f91 /crates/ra_hir_def/src/nameres/tests.rs
parent07340a62cc1b34efcebfc9f4cfc42f655edd2fc8 (diff)
Fix a problem with `Durability` of libraries
When processing a change with added libraries, we used `Default::default` for `SourceRoot` which sets `is_library` to false. Since we use `is_library` to decide whether to use low or high durability, I believe that this caused us to mark many library dependencies as having low durability and thus increased the size of the graph that salsa needed to verify on every change. Based on my initial tests this speeds up the `CrateDefMapQuery` on rust-analyzer from about ~64ms to ~14ms and reduces the number of validations for the query from over 60k to about 7k. Signed-off-by: Michal Terepeta <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/nameres/tests.rs')
0 files changed, 0 insertions, 0 deletions