rust-analyzer/crates/ra_ide/src
Michal Terepeta 7cd6f12926 Split crate_def_map into two methods
This change:

  - introduces `compute_crate_def_map` query and renames
    `CrateDefMap::crate_def_map_query` for consistency,

  - annotates `crate_def_map` as `salsa::transparent` and adds a
    top-level `crate_def_map` wrapper function around that starts the
    profiler and immediately calls into `compute_crate_def_map` query.

This allows us to better understand where we spent the time, in
particular, how much is spent in the recomputaiton and how much in
salsa.

Example output (where we don't actually re-compute anything, but the
query still takes a non-trivial amount of time):

```
  211ms - handle_inlay_hints
      150ms - get_inlay_hints
          150ms - SourceAnalyzer::new
               65ms - def_with_body_from_child_node
                   65ms - analyze_container
                       65ms - analyze_container
                           65ms - Module::from_definition
                               65ms - Module::from_file
                                   65ms - crate_def_map
                                        1ms - parse_macro_query (6 calls)
                                        0ms - raw_items_query (1 calls)
                                       64ms - ???
```

Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
2020-01-03 13:59:46 +01:00
..
completion visible_from -> is_visible_from 2019-12-27 11:25:04 +01:00
display Don't bother with focus range for navigation to locals 2019-12-18 16:45:42 +01:00
references Fix resolve for field init shorthand 2019-12-20 14:48:14 +01:00
snapshots Drop support for legacy colorization 2019-12-31 14:11:25 +01:00
assists.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
call_info.rs cargo fmt 2019-12-18 09:11:47 -05:00
change.rs Split crate_def_map into two methods 2020-01-03 13:59:46 +01:00
completion.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
db.rs Remove more dead code 2019-12-08 17:45:14 +01:00
diagnostics.rs Rename Source -> InFile 2019-11-28 12:50:26 +03:00
display.rs Remove unused imports 2019-12-20 11:18:24 -05:00
expand.rs Use simpler logic on original_range 2019-12-15 02:34:16 +08:00
expand_macro.rs Clippy lints 2019-12-20 15:14:30 -05:00
extend_selection.rs Clippy lints 2019-12-20 15:14:30 -05:00
feature_flags.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
folding_ranges.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
goto_definition.rs Fix parser for macro call in pattern position 2019-12-20 23:26:04 +08:00
goto_type_definition.rs for goto and hover pick the token based on a priority 2019-12-13 22:00:05 +01:00
hover.rs Remove the index resolution from hover 2019-12-20 11:16:47 -05:00
impls.rs Rename Source -> InFile 2019-11-28 12:50:26 +03:00
inlay_hints.rs Omit closure parameters 2019-12-23 18:30:25 +02:00
join_lines.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
lib.rs Remove TruncateOptions struct 2019-12-19 16:43:41 +02:00
line_index.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
line_index_utils.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
marks.rs Fix resolve for field init shorthand 2019-12-20 14:48:14 +01:00
matching_brace.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
mock_analysis.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
parent_module.rs Remove ty from code_model 2019-12-08 12:44:14 +01:00
references.rs Rename GenericParam -> TypeParam 2019-12-07 20:25:48 +01:00
runnables.rs Rename Source -> InFile 2019-11-28 12:50:26 +03:00
source_change.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
status.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
symbol_index.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
syntax_highlighting.rs Drop support for legacy colorization 2019-12-31 14:11:25 +01:00
syntax_tree.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
test_utils.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
typing.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00
wasm_shims.rs rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00