Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-3009

SubgraphStrategy produces excessive filtering when multiple labels are filtered upon

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.6.2
    • 3.6.6, 3.7.1
    • process
    • None

    Description

      See the example profile below. Notice the traversal includes _has _filters everywhere repeatedly applied for vertices which are already filtered before too.

      gremlin> g.withStrategies(SubgraphStrategy.build().
      ......1>            vertices(hasLabel('x','y','z')).create()).
      ......2>   V().out().profile()
      ==>Traversal Metrics
      Step                                                               Count  Traversers       Time (ms)    % Dur
      =============================================================================================================
      TinkerGraphStep(vertex,[~label.within([x, y, z])])                                             0.160    58.50
      VertexStep(OUT,edge)                                                                           0.017     6.53
      AndStep([[EdgeVertexStep(IN), HasStep([~label.w...                                             0.017     6.19
        EdgeVertexStep(IN)                                                                           0.000
        HasStep([~label.within([x, y, z])])                                                          0.000
        EdgeVertexStep(OUT)                                                                          0.000
        HasStep([~label.within([x, y, z])])                                                          0.000
      EdgeVertexStep(IN)                                                                             0.064    23.59
      HasStep([~label.within([x, y, z])])                                                            0.014     5.18
                                                  >TOTAL                     -           -           0.274        -
      

      Attachments

        Activity

          People

            spmallette Stephen Mallette
            brianok Brian O'Keefe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: