Skip to content

Commit

Permalink
Use faster transitive closure when loading graph.
Browse files Browse the repository at this point in the history
It has the additional advantage that it doesn’t crash for our data …
  • Loading branch information
thvitt committed Jul 6, 2020
1 parent d674b51 commit e951194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/macrogen/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def _load_from(self, load_from: Path):
check_acyclic(self.dag,
f'Base graph from {load_from} is not acyclic after removing conflicting and ignored edges.')
self.order_refs()
self.closure = nx.transitive_closure(self.dag)
self.closure = nx.transitive_closure_dag(self.dag, self.order)
self._augment_details()

def node(self, spec: Union[Reference, date, str], default=KeyError):
Expand Down

0 comments on commit e951194

Please sign in to comment.