diff options
author | Michal Terepeta <[email protected]> | 2020-01-03 16:02:08 +0000 |
---|---|---|
committer | Michal Terepeta <[email protected]> | 2020-01-03 18:58:11 +0000 |
commit | d6c2a59538c83b6141f7ab9596a9fde64f94c116 (patch) | |
tree | 77ce23e02956f78d7f9efe1a4eb6a7515ae3344c /crates/ra_hir | |
parent | 15d94cbffcb07fa910d715b2acef88109ae24d39 (diff) |
Split `infer` query into two for better profiling
This is the same change as we did with `crate_def_map` and it does seem
that we mostly spend time in salsa, without recomputing much on
rust-analyzer side.
Example output:
```
233ms - handle_inlay_hints
163ms - get_inlay_hints
163ms - SourceAnalyzer::new
67ms - def_with_body_from_child_node
67ms - analyze_container
67ms - analyze_container
67ms - Module::from_definition
67ms - Module::from_file
67ms - crate_def_map
0ms - parse_macro_query (6 calls)
0ms - raw_items_query (1 calls)
66ms - ???
0ms - crate_def_map (1 calls)
0ms - crate_def_map (1 calls)
96ms - infer
2ms - trait_solve_query (2 calls)
94ms - ???
0ms - body_with_source_map_query (1 calls)
0ms - crate_def_map (1 calls)
[...]
```
Signed-off-by: Michal Terepeta <[email protected]>
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/src/db.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index 0af4a2868..e6079b88d 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -12,10 +12,10 @@ pub use hir_expand::db::{ | |||
12 | ParseMacroQuery, | 12 | ParseMacroQuery, |
13 | }; | 13 | }; |
14 | pub use hir_ty::db::{ | 14 | pub use hir_ty::db::{ |
15 | AssociatedTyDataQuery, CallableItemSignatureQuery, FieldTypesQuery, GenericDefaultsQuery, | 15 | AssociatedTyDataQuery, CallableItemSignatureQuery, DoInferQuery, FieldTypesQuery, |
16 | GenericPredicatesQuery, HirDatabase, HirDatabaseStorage, ImplDatumQuery, ImplsForTraitQuery, | 16 | GenericDefaultsQuery, GenericPredicatesQuery, HirDatabase, HirDatabaseStorage, ImplDatumQuery, |
17 | ImplsInCrateQuery, InferQuery, StructDatumQuery, TraitDatumQuery, TraitSolveQuery, TyQuery, | 17 | ImplsForTraitQuery, ImplsInCrateQuery, StructDatumQuery, TraitDatumQuery, TraitSolveQuery, |
18 | ValueTyQuery, | 18 | TyQuery, ValueTyQuery, |
19 | }; | 19 | }; |
20 | 20 | ||
21 | #[test] | 21 | #[test] |