diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-01-29 20:09:49 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-01-29 20:09:49 +0000 |
commit | 5dcd9fdf5e95573de9bc46f32b86d6fbc5e7c18d (patch) | |
tree | 0dd24c080fb5052428023373cb3109bd566f8f83 /crates/ra_syntax/test_data/parser/err/0025_nope.rs | |
parent | d92a15c1637860a669970142abe37d1daf5f2c73 (diff) | |
parent | 644c383f65324b5fe1ada42680923c2529accb26 (diff) |
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 <[email protected]>
Co-authored-by: Michal Terepeta <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data/parser/err/0025_nope.rs')
0 files changed, 0 insertions, 0 deletions