You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by okram <gi...@git.apache.org> on 2016/10/04 23:13:56 UTC
[GitHub] tinkerpop pull request #449: TINKERPOP-1488: Make LazyBarrierStrategy part o...
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 <ok...@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 <ok...@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.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tinkerpop issue #449: TINKERPOP-1488: Make LazyBarrierStrategy part of the d...
Posted by spmallette <gi...@git.apache.org>.
Github user spmallette commented on the issue:
https://github.com/apache/tinkerpop/pull/449
All tests pass with `docker/build.sh -t -i`
VOTE +1
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tinkerpop issue #449: TINKERPOP-1488: Make LazyBarrierStrategy part of the d...
Posted by spmallette <gi...@git.apache.org>.
Github user spmallette commented on the issue:
https://github.com/apache/tinkerpop/pull/449
This is a breaking change in the sense as the package name changed. I doubt it should break most users, but a breaking change nonetheless. I think it would have been better to deprecate it where it was and copy/paste to the new package There would be two classes that did the same thing, but it would all happen without a break. Then we just delete the deprecated one for 3.3.0.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tinkerpop pull request #449: TINKERPOP-1488: Make LazyBarrierStrategy part o...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/tinkerpop/pull/449
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tinkerpop issue #449: TINKERPOP-1488: Make LazyBarrierStrategy part of the d...
Posted by okram <gi...@git.apache.org>.
Github user okram commented on the issue:
https://github.com/apache/tinkerpop/pull/449
@spmallette -- good call. I added back `finalization.LazyBarrierStrategy` and @Deprecated it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] tinkerpop issue #449: TINKERPOP-1488: Make LazyBarrierStrategy part of the d...
Posted by twilmes <gi...@git.apache.org>.
Github user twilmes commented on the issue:
https://github.com/apache/tinkerpop/pull/449
The code and tests look good to me. `mvn clean install` also ran without issue.
VOTE: +1
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---