Skip to content

Commit

Permalink
Short-circuit set operations for nice speed boost
Browse files Browse the repository at this point in the history
  • Loading branch information
boxysean committed Jan 22, 2023
1 parent 93619a9 commit 9f96087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/dbt/graph/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _find_new_additions(self) -> None:
queue and add them.
"""
for node, in_degree in self.graph.in_degree():
if not self._already_known(node) and in_degree == 0:
if in_degree == 0 and not self._already_known(node):
self.inner.put((self._scores[node], node))
self.queued.add(node)

Expand Down

0 comments on commit 9f96087

Please sign in to comment.