cargo icon indicating copy to clipboard operation
cargo copied to clipboard

Highlight transitive dependencies in --timings graph

Open HadrienG2 opened this issue 6 years ago • 1 comments

The -Ztimings graph gives a hint of why some crates are built by highlighting which crate depends on which other crate on mouse hover, which is great.

However, it it hard to follow long dependency chains (e.g. those from the rand and num micro-crates) because each crate in the dependency chain must be hovered one by one. Further, the entire dependency chain may not be displayed if a min unit time filter is enabled.

This problem could be resolved by highlighting transitive dependency relationships. But an obvious problem to be resolved is that everyone has a dependency relationship with everyone else if the dependency graph is searched at a deep enough depth. I think this could be addressed by either...

  1. Adjusting the dependency link color according to distance in the dependency graph: the "closer" two crates are, the stronger the color. The distance metric could be weighted by crate build time in order to correctly highlight complex dependency chains from micro-crates.
  2. Another approach would be to focus the crate dependency display on specific kinds of dependencies that are likely to be of highest interest to the user, such as critical-path dependencies.

HadrienG2 avatar Oct 04 '19 08:10 HadrienG2

Another approach would be to focus the crate dependency display on specific kinds of dependencies that are likely to be of highest interest to the user, such as critical-path dependencies.

When I've looked at the timing output the biggest question I want to answer is "what can I do to speed up the build?" The most interesting thing to know for that is probably "what's on the critical path?"

luser avatar May 06 '20 14:05 luser