do not look for all descendants from root outputs
The output destroy node only needs to connect to each of the output's up-edges in order to be connected transitively to all of the outputs dependencies. In large, highly-connected graphs, this may save considerable time for each output.
This commit is contained in:
parent
8e4bd669e8
commit
c0a5214aec
|
@ -86,10 +86,7 @@ func (t *destroyRootOutputTransformer) Transform(g *Graph) error {
|
||||||
log.Printf("[TRACE] creating %s", node.Name())
|
log.Printf("[TRACE] creating %s", node.Name())
|
||||||
g.Add(node)
|
g.Add(node)
|
||||||
|
|
||||||
deps, err := g.Descendents(v)
|
deps := g.UpEdges(v)
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// the destroy node must depend on the eval node
|
// the destroy node must depend on the eval node
|
||||||
deps.Add(v)
|
deps.Add(v)
|
||||||
|
|
Loading…
Reference in New Issue