rust/crates/ra_prof
Michal Terepeta 39cbb6b620 Rewrite ra_prof's profile printing
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>
2020-01-22 20:13:56 +01:00
..
src Rewrite ra_prof's profile printing 2020-01-22 20:13:56 +01:00
Cargo.toml Disable doctests 2019-11-17 18:35:05 +03:00