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

TraverserSet initial size should be specified for barriers.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Do
    • 3.2.2
    • None
    • benchmark, process
    • None

    Description

      TraverserSet is one of the most important objects in the Gremlin traversal machine. Each step is backed by a TraverserSet. Typically, steps will have only a few traversers ever in their set, but some steps can have lots. Examples include: RepeatStep, NoOpBarrierStep, OrderGlobalStep, DedupGlobalStep, SampleGlobalStep, LambdaCollectingBarrierStep...

      In particular, I'm looking at NoOpBarrierStep as that is used extensively as an optimization by LazyBarrierStrategy, PathRetractionStrategy, RepeatUnrollStrategy. If we already know the max size of the barrier, we should be setting the "initial size" of the TraverserSet (which is basically a wrapper around a LinkedHashMap). The default of 16 seems not smart. Perhaps twilmes or mbroecheler have some thoughts on what the initial size of the LinkedHashMap should be given a known maxBarrierSize.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              okram Marko A. Rodriguez
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: