rust/crates
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
..
ra_arena Switch to variant-granularity field type inference 2019-11-25 00:12:36 +03:00
ra_assists Merge #2650 2019-12-29 15:02:27 +00:00
ra_batch Support setting cargo features 2019-12-13 18:16:34 +08:00
ra_cargo_watch Update dependencies 2020-01-01 17:51:48 -05:00
ra_cfg
ra_cli Remove ty from code_model 2019-12-08 12:44:14 +01:00
ra_db Run rustfmt with respect to Cargo.toml edition 2019-12-04 23:05:01 +01:00
ra_fmt
ra_hir Split crate_def_map into two methods 2020-01-03 13:59:46 +01:00
ra_hir_def Split crate_def_map into two methods 2020-01-03 13:59:46 +01:00
ra_hir_expand Add dummy implementations of env! and option_env! builtins 2019-12-21 13:34:43 +01:00
ra_hir_ty Resolve traits in infer using lang item infrastructure 2019-12-29 17:39:31 +01:00
ra_ide Split crate_def_map into two methods 2020-01-03 13:59:46 +01:00
ra_lsp_server Update dependencies 2020-01-01 17:51:48 -05:00
ra_mbe Add details about test_repeat_bad_var current state 2019-12-30 17:12:20 +01:00
ra_parser Merge #2642 2019-12-22 08:05:02 +00:00
ra_prof More compact profiling display 2019-12-22 14:17:31 +01:00
ra_project_model Only add features flags if non-empty 2019-12-24 00:27:48 +08:00
ra_syntax Collect visibility of items during nameres 2019-12-26 16:23:40 +01:00
ra_text_edit
ra_tt Refactoring 2019-12-18 13:10:37 +08:00
ra_vfs_glob
test_utils Refactor goto tests to always specify texts 2019-12-18 16:00:35 +01:00