aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cfg
diff options
context:
space:
mode:
authorMichal Terepeta <[email protected]>2020-01-19 15:07:15 +0000
committerMichal Terepeta <[email protected]>2020-01-22 19:13:56 +0000
commit39cbb6b620244fcf921f45669ed40cc6ebdf6520 (patch)
treee8516f6712b932bf51e558302cec4e1621255fd7 /crates/ra_cfg
parent9b1465af322e311152a23c1f61f967bda2bffcee (diff)
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 <[email protected]>
Diffstat (limited to 'crates/ra_cfg')
0 files changed, 0 insertions, 0 deletions