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

by-modulator optimization strategy

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Done
    • 3.2.4
    • 3.5.0
    • process
    • None

    Description

      The can be a significant difference in performance depending on whether you use by(id) or by(id()):

      gremlin> g.V().out().in().path().by(id()).profile()
      ==>Traversal Metrics
      Step                                                               Count  Traversers       Time (ms)    % Dur
      =============================================================================================================
      TinkerGraphStep(vertex,[])                                             6           6          12.137    58.03
      VertexStep(OUT,vertex)                                                 6           6           1.345     6.43
      VertexStep(IN,vertex)                                                 12          12           0.861     4.12
      PathStep([[IdStep, ProfileStep]])                                     12          12           6.570    31.42
        IdStep                                                              36          36           0.452
                                                  >TOTAL                     -           -          20.916        -
      gremlin> g.V().out().in().path().by(id).profile()
      ==>Traversal Metrics
      Step                                                               Count  Traversers       Time (ms)    % Dur
      =============================================================================================================
      TinkerGraphStep(vertex,[])                                             6           6           0.876    11.54
      VertexStep(OUT,vertex)                                                 6           6           0.714     9.40
      VertexStep(IN,vertex)                                                 12          12           3.299    43.43
      PathStep([id])                                                        12          12           2.706    35.63
                                                  >TOTAL                     -           -           7.596        -
      

      We should have a strategy that rewrites these simple patterns. This affects id(), label(), key(), value(), but also by(values("name")), which can be rewritten as by("name")

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            dkuppitz Daniel Kuppitz
            dkuppitz Daniel Kuppitz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment