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())
|
||||
g.Add(node)
|
||||
|
||||
deps, err := g.Descendents(v)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
deps := g.UpEdges(v)
|
||||
|
||||
// the destroy node must depend on the eval node
|
||||
deps.Add(v)
|
||||
|
|
Loading…
Reference in New Issue