Marko A. Rodriguez created TINKERPOP-1503:

             Summary: TraverserSet initial size should be specified for 
                 Key: TINKERPOP-1503
             Project: TinkerPop
          Issue Type: Improvement
          Components: benchmark, process
    Affects Versions: 3.2.2
            Reporter: Marko A. Rodriguez

{{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}}. 

This message was sent by Atlassian JIRA

Reply via email to