rust-analyzer/crates
bors[bot] 5dcd9fdf5e
Merge #2895
2895: Rewrite ra_prof's profile printing r=michalt a=michalt

This changes the way we print things to first construct a mapping from
events to the children and uses that mapping to actually print things.
It should not change the actual output that we produce.

The new approach two benefits:

 * It avoids a potential quadratic behavior of the previous approach.
   For instance, for a vector of N elements:
   ```
   [Message{level: (N - 1)}, ..., Message{level: 1}, Message{level: 0}]
   ```
   we would first do a linear scan to find entry with level 0, then
   another scan to find one with level 1, etc.

 * It makes it much easier to improve the output in the future, because
   we now pre-compute the children for each entry and can easily take
   that into account when printing.

Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>

Co-authored-by: Michal Terepeta <michal.terepeta@gmail.com>
2020-01-29 20:09:49 +00:00
..
ra_arena Switch to variant-granularity field type inference 2019-11-25 00:12:36 +03:00
ra_assists Properly select a target for auto importing 2020-01-29 16:23:18 +02:00
ra_batch Support setting cargo features 2019-12-13 18:16:34 +08:00
ra_cargo_watch Change error output to make a bit more sense 2020-01-29 13:51:20 +01:00
ra_cfg Disable doctests 2019-11-17 18:35:05 +03:00
ra_cli Disable env_logger humantime feature 2020-01-25 11:53:40 +01:00
ra_db Remove the Default impl for SourceRoot 2020-01-08 19:42:27 +01:00
ra_fmt fix 2190; add test for "replace if let with match" 2019-11-20 19:01:06 +01:00
ra_hir Re-sync queries for memory usage measurnment 2020-01-29 16:10:46 +01:00
ra_hir_def Merge #2917 2020-01-28 16:22:18 +00:00
ra_hir_expand Prefer imports starting with std 2020-01-28 01:02:06 +02:00
ra_hir_ty Standard formatting for array types 2020-01-28 15:32:20 +01:00
ra_ide Re-sync queries for memory usage measurnment 2020-01-29 16:10:46 +01:00
ra_lsp_server Fix long loop timeout 2020-01-29 14:04:10 +01:00
ra_mbe Add details about test_repeat_bad_var current state 2019-12-30 17:12:20 +01:00
ra_parser ra_syntax: remove code duplication and token reevaluation from ast::Literal::kind() 2020-01-22 13:02:21 +02:00
ra_prof Merge #2895 2020-01-29 20:09:49 +00:00
ra_project_model Address nit 2020-01-10 22:41:52 +01:00
ra_syntax Fixed a typo 2020-01-22 13:02:21 +02:00
ra_text_edit Disable doctests 2019-11-17 18:35:05 +03:00
ra_tt Refactoring 2019-12-18 13:10:37 +08:00
ra_vfs_glob Disable doctests 2019-11-17 18:35:05 +03:00
test_utils Simplify fixture parsing 2020-01-29 14:06:23 +01:00