Uploaded image for project: 'Apache Gearpump'
  1. Apache Gearpump
  2. GEARPUMP-349

Graph#topologicalOrderIterator is slow for large graph

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8.4
    • 0.8.5
    • core
    • None

    Description

      The algorithm is as follows

      1. find zero in-degree nodes from a copied graph.
      2. remove nodes from the copied graph and add them to the output
      3. repeat 1

      The issue is that step 1 traverses all remaining nodes each time, which costs the algorithm O(n^2) time

      Graph#hasCycle has a similar issue

      Attachments

        Issue Links

          Activity

            People

              HuafengWang Huafeng Wang
              mauzhang Manu Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment