()
| 444 | return leaf_nodes_sorted.pop() |
| 445 | |
| 446 | def use_longest_path() -> bool: |
| 447 | size = 0 |
| 448 | # Heavy reducer / splitter topologies often benefit from a very |
| 449 | # traditional critical path that expresses the longest chain of |
| 450 | # tasks. |
| 451 | if abs(len(root_nodes) - len(leaf_nodes)) / len(root_nodes) < 0.8: |
| 452 | # If the graph stays about the same, we are checking for symmetry |
| 453 | # and choose a "quickest path first" approach if the graph appears |
| 454 | # to be asymmetrical |
| 455 | for r in root_nodes: |
| 456 | if not size: |
| 457 | size = len(leafs_connected[r]) |
| 458 | elif size != len(leafs_connected[r]): |
| 459 | return False |
| 460 | |
| 461 | return True |
| 462 | |
| 463 | # Some topologies benefit if the node with the most dependencies |
| 464 | # is used as first choice, others benefit from the opposite. |
no outgoing calls
no test coverage detected
searching dependent graphs…