[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15357063#comment-15357063 ] ASF GitHub Bot commented on TINKERPOP-1349: --- Github user asfgit closed the pull request at: https://github.com/apache/tinkerpop/pull/349 > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.1 > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15356805#comment-15356805 ] ASF GitHub Bot commented on TINKERPOP-1349: --- Github user dkuppitz commented on the issue: https://github.com/apache/tinkerpop/pull/349 Same here, `docker/build.sh -t -i -n` reported success over night. All changes after my first vote were included in this test run. > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.1 > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15356315#comment-15356315 ] ASF GitHub Bot commented on TINKERPOP-1349: --- Github user spmallette commented on the issue: https://github.com/apache/tinkerpop/pull/349 All tests pass with `docker/build.sh -t -n -i` VOTE +1 > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.0-incubating > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15355441#comment-15355441 ] ASF GitHub Bot commented on TINKERPOP-1349: --- Github user spmallette commented on the issue: https://github.com/apache/tinkerpop/pull/349 Travis is failing - looks like an issue from Rat - missing an Apache header in `TraversalStrategyPerformanceTest`. @okram I don't think there's a way to get a Parameterized test to run a single test once. It pretty much treats the whole test case as parameterized when you use that feature. Using `Enclosed` as you did is the only way to make that work afaik. @pietermartin do you intend to vote on this one? you had a fair number of comments/questions on the JIRA ticket > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.0-incubating > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353723#comment-15353723 ] pieter martin commented on TINKERPOP-1349: -- Ok thanks > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.0-incubating > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353714#comment-15353714 ] Marko A. Rodriguez commented on TINKERPOP-1349: --- Yea, that unrolls traversers (see how {{next()}} works vs. {{iterate()}}). Most of your clock cylces is in that unrolling of traversers which is not related to the purpose of this ticket. > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.0-incubating > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353712#comment-15353712 ] pieter martin commented on TINKERPOP-1349: -- I ran this, {code} @Test public void testRepeat() throws IOException { Graph graph = TinkerGraph.open(); GraphTraversalSource g = graph.traversal(); graph.io(GraphMLIo.build()).readGraph("../data/grateful-dead.xml"); long timeStart = System.currentTimeMillis(); GraphTraversal traversal = graph.traversal().V().out().out().out(); Vertex v = null; while (traversal.hasNext()) { v = traversal.next(); } System.out.println("done"); long timeEnd = System.currentTimeMillis(); System.out.println(timeEnd - timeStart); timeStart = System.currentTimeMillis(); traversal = graph.traversal().V().out().out().out(); v = null; while (traversal.hasNext()) { v = traversal.next(); } System.out.println("done"); timeEnd = System.currentTimeMillis(); System.out.println(timeEnd - timeStart); timeStart = System.currentTimeMillis(); traversal = graph.traversal().V().out().out().out(); while (traversal.hasNext()) { v = traversal.next(); } System.out.println("done"); timeEnd = System.currentTimeMillis(); System.out.println(timeEnd - timeStart); } {code} output {code} done 880 done 633 done 555 {code} > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.0-incubating > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353703#comment-15353703 ] ASF GitHub Bot commented on TINKERPOP-1349: --- Github user dkuppitz commented on the issue: https://github.com/apache/tinkerpop/pull/349 VOTE: +1 > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.0-incubating > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353698#comment-15353698 ] Marko A. Rodriguez commented on TINKERPOP-1349: --- I don't know what you ran, but {{iterate()}} is smart to use {{traversal.getEndStep()}} and thus doesn't unroll traversers like {{next()}} does. {code} gremlin> graph = TinkerGraph.open() ==>tinkergraph[vertices:0 edges:0] gremlin> graph.io(gryo()).readGraph('data/grateful-dead.kryo') ==>null gremlin> g = graph.traversal() ==>graphtraversalsource[tinkergraph[vertices:808 edges:8049], standard] gremlin> g.getStrategies().removeStrategies(RepeatUnrollStrategy) ==>strategies[ConnectiveStrategy, RangeByIsCountStrategy, IdentityRemovalStrategy, IncidentToAdjacentStrategy, AdjacentToIncidentStrategy, FilterRankingStrategy, MatchPredicateStrategy, TinkerGraphStepStrategy, ProfileStrategy, StandardVerificationStrategy] gremlin> clock(5){g.V().repeat(out()).times(3).iterate()} ==>257.0513638 gremlin> clock(5){g.V().out().out().out().iterate()} ==>729.3921484 gremlin> clock(5){g.V().out().barrier().out().barrier().out().barrier().iterate()} ==>9.738713 gremlin> {code} > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.0-incubating > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353670#comment-15353670 ] pieter martin commented on TINKERPOP-1349: -- Ok, tx, I reran the test but this time iterating the result, so now `count()` and then the result are equivalent which sets my intuition at rest again. Nothing to bulk I suppose? > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.0-incubating > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353648#comment-15353648 ] Marko A. Rodriguez commented on TINKERPOP-1349: --- Bulking is one of the best things about Gremlin and what allows OLAP to scale. Every {{Traverser}} has a {{bulk()}}. When two traversers are {{equal()}} (same place in the graph and in the traversal), then they become one traverser with a bulk being the sum of their respective bulks. The article on Gremlin discusses bulking at length -- http://arxiv.org/abs/1508.03843 > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.0-incubating > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353564#comment-15353564 ] pieter martin commented on TINKERPOP-1349: -- Hi, I just ran the following test, {code} @Test public void testRepeat() throws IOException { Graph graph = TinkerGraph.open(); GraphTraversalSource g = graph.traversal(); graph.io(GraphMLIo.build()).readGraph("../data/grateful-dead.xml"); long timeStart = System.currentTimeMillis(); System.out.println(graph.traversal().V().out().out().out().count().next()); long timeEnd = System.currentTimeMillis(); System.out.println(timeEnd - timeStart); timeStart = System.currentTimeMillis(); System.out.println(graph.traversal().V().out().barrier().out().barrier().out().barrier().count().next()); timeEnd = System.currentTimeMillis(); System.out.println(timeEnd - timeStart); } {code} the output is {code} 14465066 1074 14465066 26 {code} So adding the barrier steps has a huge impact on performance. You mention the "the benefit of bulking is leveraged" Can you point me to why and where in the code this benefit is? Thanks > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.0-incubating > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353494#comment-15353494 ] Marko A. Rodriguez commented on TINKERPOP-1349: --- {code} gremlin> graph = TinkerGraph.open() ==>tinkergraph[vertices:0 edges:0] gremlin> graph.io(gryo()).readGraph('data/grateful-dead.kryo') ==>null gremlin> g = graph.traversal() ==>graphtraversalsource[tinkergraph[vertices:808 edges:8049], standard] gremlin> g.getStrategies().removeStrategies(RepeatUnrollStrategy) ==>strategies[ConnectiveStrategy, RangeByIsCountStrategy, IdentityRemovalStrategy, IncidentToAdjacentStrategy, AdjacentToIncidentStrategy, FilterRankingStrategy, MatchPredicateStrategy, TinkerGraphStepStrategy, ProfileStrategy, StandardVerificationStrategy] gremlin> // ==>true gremlin> clock(5){g.V().repeat(out()).times(3).count().next()} ==>262.0667158 gremlin> clock(5){g.V().out().out().out().count().next()} ==>909.031809001 gremlin> clock(5){g.V().out().barrier().out().barrier().out().barrier().count().next()} ==>6.06675015 gremlin> {code} {{RepeatStep}} is a lazy barrier in that it will only barrier up to the full child traversal being drained as it can't "back drain" a traversal. Finally, with {{RepeatUnrollStrategy}} added back: {code} gremlin> graph = TinkerGraph.open() ==>tinkergraph[vertices:0 edges:0] gremlin> graph.io(gryo()).readGraph('data/grateful-dead.kryo') ==>null gremlin> g = graph.traversal() ==>graphtraversalsource[tinkergraph[vertices:808 edges:8049], standard] gremlin> // ==>true gremlin> clockWithResult(5){g.V().repeat(out()).times(3).count().next()} ==>5.2639277 ==>14465066 gremlin> gremlin> g.V().repeat(out()).times(3).count().explain() ==>Traversal Explanation Original Traversal [GraphStep(vertex,[]), RepeatStep([VertexStep(OUT,vertex), RepeatEndStep],until(loops(3)),emi t(false)), CountGlobalStep] ConnectiveStrategy [D] [GraphStep(vertex,[]), RepeatStep([VertexStep(OUT,vertex), RepeatEndStep],until(loops(3)),emi t(false)), CountGlobalStep] RangeByIsCountStrategy [O] [GraphStep(vertex,[]), RepeatStep([VertexStep(OUT,vertex), RepeatEndStep],until(loops(3)),emi t(false)), CountGlobalStep] IdentityRemovalStrategy [O] [GraphStep(vertex,[]), RepeatStep([VertexStep(OUT,vertex), RepeatEndStep],until(loops(3)),emi t(false)), CountGlobalStep] IncidentToAdjacentStrategy [O] [GraphStep(vertex,[]), RepeatStep([VertexStep(OUT,vertex), RepeatEndStep],until(loops(3)),emi t(false)), CountGlobalStep] AdjacentToIncidentStrategy [O] [GraphStep(vertex,[]), RepeatStep([VertexStep(OUT,vertex), RepeatEndStep],until(loops(3)),emi t(false)), CountGlobalStep] FilterRankingStrategy[O] [GraphStep(vertex,[]), RepeatStep([VertexStep(OUT,vertex), RepeatEndStep],until(loops(3)),emi t(false)), CountGlobalStep] MatchPredicateStrategy [O] [GraphStep(vertex,[]), RepeatStep([VertexStep(OUT,vertex), RepeatEndStep],until(loops(3)),emi t(false)), CountGlobalStep] RepeatUnrollStrategy [O] [GraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, VertexStep(OUT,vertex), NoOpB arrierStep, VertexStep(OUT,vertex), NoOpBarrierStep, CountGlobalStep] TinkerGraphStepStrategy [P] [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, VertexStep(OUT,vertex), NoOpBarrierStep, VertexStep(OUT,vertex), NoOpBarrierStep, CountGlobalStep] ProfileStrategy [F] [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, VertexStep(OUT,vertex), NoOpBarrierStep, VertexStep(OUT,vertex), NoOpBarrierStep, CountGlobalStep] StandardVerificationStrategy [V] [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, VertexStep(OUT,vertex), NoOpBarrierStep, VertexStep(OUT,vertex), NoOpBarrierStep, CountGlobalStep] Final Traversal[TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, VertexStep(OUT,vertex), NoOpBarrierStep, VertexStep(OUT,vertex), NoOpBarrierStep, CountGlobalStep] gremlin> {code} Huh, just realized a nice optimization, if the step after last step of the unroll is a {{BarrierStep}}, then the last {{NoOpBarrierStep}} is not needed. > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semant
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353408#comment-15353408 ] pieter martin commented on TINKERPOP-1349: -- I did not know that the `RepeatStep` is a barrier step. The documentation does not mention it. Sqlg also unrolls repeat steps but never inserted barrier steps. Are you be able to write a sudo test that fails if the barrier steps are not inserted and I'll test it? > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.0-incubating > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353357#comment-15353357 ] ASF GitHub Bot commented on TINKERPOP-1349: --- Github user okram commented on the issue: https://github.com/apache/tinkerpop/pull/349 NOTE: This can not go into `tp31/` because `NoOpBarrierStep` is new to TinkerPop 3.2.0. > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.0-incubating > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353355#comment-15353355 ] ASF GitHub Bot commented on TINKERPOP-1349: --- GitHub user okram opened a pull request: https://github.com/apache/tinkerpop/pull/349 TINKERPOP-1349: RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics. https://issues.apache.org/jira/browse/TINKERPOP-1349 `RepeatUnrollStrategy` is a Standard-only strategy that will unroll a `repeat()` into a linear form if and only if it has a known loop amount (e.g. `times(2)`). That is `repeat(out()).times(2)` becomes `out().barrier().out().barrier()`. The `barrier()` insertions are necessary as `repeat()` itself is a barrier step and also, the benefit of bulking is leveraged. `RepeatUnrollStrategy` removes the need for `RepeatStep`, `RepeatEndStep`, and `LoopTraversal`. `RepeatUnrollStrategyTest` ensures that unrolling is faster than not-unrolling. Here are some runtimes. The first item in the Pair is the runtime and the second item is the amount of unique objects being processed. With more unique objects, the faster it gets. Note that at 10 unique elements (tiny traversal), sometimes rolled is faster than unrolled and vice versa (i.e. they are equal). ``` rolled:[0.2284372029998, 10]unrolled:[0.174451055, 10] rolled:[0.514145509, 100] unrolled:[0.212532769, 100] rolled:[1.494435725999, 1000] unrolled:[0.441714987, 1000] rolled:[28.502658626, 1]unrolled:[12.93611264998, 1] ``` Also in this ticket, I fixed a bug in `BranchStep` where children were not being integrated and thus, susceptible to clone-problems. Moreover, I added a timing test to `IdentityRemovalStrategyTest`. @spmallette, do you know how to make a test run once and only once in a `Parameterized` test case? If so, can you update `IdentityRemoveStrategyTest` and `RepeatUnrollStrategyTest` accordingly? --- ``` CHANGELOG * Added `RepeatUnrollStrategy` to linearize a `repeat()`-traversal if loop amount is known at compile time. * Fixed a bug in `BranchStep` around child integration during `clone()`. ``` VOTE +1. You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/tinkerpop TINKERPOP-1349 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tinkerpop/pull/349.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #349 commit 8753366a975101ba4edaa1888163abda3238f7ff Author: Marko A. Rodriguez Date: 2016-06-28T16:44:32Z added RepeatUnrollStrategy for when the loop amount is known at compile time. Fixed a bug in BranchStep around child integration. > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.0-incubating > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TINKERPOP-1349) RepeatUnrollStrategy should unroll loops while maintaining equivalent semantics.
[ https://issues.apache.org/jira/browse/TINKERPOP-1349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353317#comment-15353317 ] pieter martin commented on TINKERPOP-1349: -- Why are the barrier steps there? I would have thought its just {code}out().out().out(){code} > RepeatUnrollStrategy should unroll loops while maintaining equivalent > semantics. > > > Key: TINKERPOP-1349 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1349 > Project: TinkerPop > Issue Type: Improvement > Components: process >Affects Versions: 3.2.0-incubating >Reporter: Marko A. Rodriguez >Assignee: Marko A. Rodriguez > Fix For: 3.2.0-incubating > > > Create {{RepeatUnrollStrategy}} that will unroll patterns such as: > {code} > repeat(out()).times(3) > // -> > out().barrier().out().barrier().out().barrier() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)