[
https://issues.apache.org/jira/browse/TINKERPOP-1682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16043963#comment-16043963
]
ASF GitHub Bot commented on TINKERPOP-1682:
-------------------------------------------
GitHub user dkuppitz opened a pull request:
https://github.com/apache/tinkerpop/pull/621
TINKERPOP-1682 by-modulator optimization strategy
https://issues.apache.org/jira/browse/TINKERPOP-1682
Implemented `ByModulatorOptimizationStrategy` which replaces certain
standard traversals w/ optimized traversals (e.g. `TokenTraversal`).
`docker/build.sh -t -i` succeeded.
VOTE: +1
I wouldn't mind to wait for
[TINKERPOP-1689](https://issues.apache.org/jira/browse/TINKERPOP-1689) to fix
the
[todo](https://github.com/apache/tinkerpop/commit/c5a1bdebf02538dda19fa73c26e1aa350aa8c32f#diff-116d9ef1d2f03e342eef281717bc5f39R83)
though.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1682
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/621.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 #621
----
commit c5a1bdebf02538dda19fa73c26e1aa350aa8c32f
Author: Daniel Kuppitz <[email protected]>
Date: 2017-06-08T13:23:08Z
Implemented `ByModulatorOptimizationStrategy` which replaces certain
standard traversals w/ optimized traversals (e.g. `TokenTraversal`).
----
> by-modulator optimization strategy
> ----------------------------------
>
> Key: TINKERPOP-1682
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1682
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.2.4
> Reporter: Daniel Kuppitz
> Assignee: Daniel Kuppitz
>
> The can be a significant difference in performance depending on whether you
> use {{by(id)}} or {{by(id())}}:
> {noformat}
> gremlin> g.V().out().in().path().by(id()).profile()
> ==>Traversal Metrics
> Step Count
> Traversers Time (ms) % Dur
> =============================================================================================================
> TinkerGraphStep(vertex,[]) 6
> 6 12.137 58.03
> VertexStep(OUT,vertex) 6
> 6 1.345 6.43
> VertexStep(IN,vertex) 12
> 12 0.861 4.12
> PathStep([[IdStep, ProfileStep]]) 12
> 12 6.570 31.42
> IdStep 36
> 36 0.452
> >TOTAL -
> - 20.916 -
> gremlin> g.V().out().in().path().by(id).profile()
> ==>Traversal Metrics
> Step Count
> Traversers Time (ms) % Dur
> =============================================================================================================
> TinkerGraphStep(vertex,[]) 6
> 6 0.876 11.54
> VertexStep(OUT,vertex) 6
> 6 0.714 9.40
> VertexStep(IN,vertex) 12
> 12 3.299 43.43
> PathStep([id]) 12
> 12 2.706 35.63
> >TOTAL -
> - 7.596 -
> {noformat}
> We should have a strategy that rewrites these simple patterns. This affects
> {{id()}}, {{label()}}, {{key()}}, {{value()}}, but also
> {{by(values("name"))}}, which can be rewritten as {{by("name")}}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)