java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy>
org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RepeatUnrollStrategy
All Implemented Interfaces:
Serializable, Comparable<Class<? extends TraversalStrategy>>, TraversalStrategy<TraversalStrategy.OptimizationStrategy>, TraversalStrategy.OptimizationStrategy

RepeatUnrollStrategy is an OLTP-only strategy that unrolls any RepeatStep if it uses a constant number of loops (times(x)) and doesn't emit intermittent elements. The strategy only applies to repeat traversals that contain exclusively safe, stateless steps from the allowed set:

Steps that are not in this allowed set will prevent the strategy from being applied. This allowed set of steps is intentionally conservative as there have been unintentional traversal semantics changes in the past when allowing a large variety of steps (especially barriers). Only steps that can be safely executed outside the repeat (and not modify semantics of the traversal) should be included. The allowed set can be expanded in future versions as additional steps are verified to be safe.

Author:
Marko A. Rodriguez (http://markorodriguez.com)
See Also:
Example:
     __.repeat(out()).times(2)   // is replaced by __.out().barrier(2500).out().barrier(2500)