[ https://issues.apache.org/jira/browse/TINKERPOP-1488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15546989#comment-15546989 ]
ASF GitHub Bot commented on TINKERPOP-1488: ------------------------------------------- GitHub user okram opened a pull request: https://github.com/apache/tinkerpop/pull/449 TINKERPOP-1488: Make LazyBarrierStrategy part of the default TraversalStrategies https://issues.apache.org/jira/browse/TINKERPOP-1488 `LazyBarrierStrategy` is now a default `OptimizationStrategy`. Rewrote `LazyBarrierStrategy` and with @dkuppitz's help, we were able to make all tested traversals either equal or faster than without `LazyBarrierStrategy`. This is a really cool optimization. ``` gremlin> graph = TinkerGraph.open() ==>tinkergraph[vertices:0 edges:0] gremlin> graph.io(gryo()).readGraph('data/grateful-dead.kryo') ==>null gremlin> gremlin> g1 = graph.traversal().withoutStrategies(LazyBarrierStrategy.class) ==>graphtraversalsource[tinkergraph[vertices:808 edges:8049], standard] gremlin> g2 = graph.traversal() ==>graphtraversalsource[tinkergraph[vertices:808 edges:8049], standard] gremlin> gremlin> clock(10){g1.V().out().in().out().count().iterate()} ==>1073.5150449999999 gremlin> clock(10){g2.V().out().in().out().count().iterate()} ==>8.8109061 gremlin> gremlin> clock(100){g1.V().out().out().count().iterate()} ==>18.75418462 gremlin> clock(100){g2.V().out().out().count().iterate()} ==>2.04183101 gremlin> gremlin> clock(100){g1.V().out().values('performances').count().iterate()} ==>1.67867484 gremlin> clock(100){g2.V().out().values('performances').count().iterate()} ==>1.4292696999999999 gremlin> gremlin> clock(100){g1.V().out().values('performances').is(gt(10)).iterate()} ==>1.76701077 gremlin> clock(100){g2.V().out().values('performances').is(gt(10)).iterate()} ==>1.47417542 gremlin> gremlin> clock(100){g1.V().has('name','Garcia').out().out().iterate()} ==>0.23742839999999998 gremlin> clock(100){g2.V().has('name','Garcia').out().out().iterate()} ==>0.24021971999999997 gremlin> gremlin> clock(100){g1.V().as('a').out('sungBy').in('sungBy').where(neq('a')).iterate()} ==>26.31896202 gremlin> clock(100){g2.V().as('a').out('sungBy').in('sungBy').where(neq('a')).iterate()} ==>21.811683509999998 gremlin> gremlin> clock(100){g1.V().has('name','DARK STAR').out('followedBy').aggregate('a').out('followedBy').in('followedBy').where(not(within('a'))).groupCount().by('name').iterate()} ==>24.6694559 gremlin> clock(100){g2.V().has('name','DARK STAR').out('followedBy').aggregate('a').out('followedBy').in('followedBy').where(not(within('a'))).groupCount().by('name').iterate()} ==>1.9376707899999999 ``` If this is VOTE'd in then, I will merge it after TINKERPOP-1455 is merged so we can do parameterization via `Configuration`. VOTE +1. You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/tinkerpop TINKERPOP-1488 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tinkerpop/pull/449.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 #449 ---- commit 5f0e8438c92555b79e7387c10a9ce915b29c8840 Author: Marko A. Rodriguez <okramma...@gmail.com> Date: 2016-10-04T22:50:48Z LazyBarrierStrategy is now a default strategy and is smart about labels, retractions, flatMaps, barriers, etc. In short, all the queries that were given to it are either equal in speed or faster. commit 658630a9785952cada916377bb06283e9e85c6c4 Author: Marko A. Rodriguez <okramma...@gmail.com> Date: 2016-10-04T23:11:51Z ProfileTests and LazyBArrierStrategy don't play well with each other because ProfileTests expect certain bulks/counts/etc. Thus, if testing and there is ProfileStep, then the strategy is not applied. ---- > Make LazyBarrierStrategy part of the default TraversalStrategies > ---------------------------------------------------------------- > > Key: TINKERPOP-1488 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1488 > Project: TinkerPop > Issue Type: Improvement > Components: process > Affects Versions: 3.2.2 > Reporter: Marko A. Rodriguez > Labels: breaking > > We have had {{LazyBarrierStrategy}} in TinkerPop since perhaps the 3.0 > release. However, it was not part of the default strategies. Moreover, its a > finalization strategy when it should be an {{OptimizationStrategy}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)