Commit 10cf4ea
committed
Avoid redundant traversal when computing static transitive dependencies
Each target's static transitive linked dependencies were computed by running transitiveClosure once per direct dependency. Whenever several direct dependencies reached the same subgraph, that subgraph was traversed once for each of them, which was redundant work that did not affect the result.
Seed a single transitiveClosure with all direct dependencies at once so each node is visited only once. The resulting set of dependencies is unchanged.1 parent c88a6fb commit 10cf4ea
1 file changed
Lines changed: 7 additions & 9 deletions
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
573 | 571 | | |
574 | 572 | | |
575 | 573 | | |
| |||
0 commit comments