[ 
https://issues.apache.org/jira/browse/TINKERPOP3-702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14569827#comment-14569827
 ] 

Marko A. Rodriguez commented on TINKERPOP3-702:
-----------------------------------------------

[~ranma] The only time it is not possible to do global bulking is when the 
nested traversal is a "local traversal." That is, when it operates on a single 
traverser at a time. To violate this condition and to have multiple traversers 
in the same scope, ruins the semantics of the nested traversal. For example: 
{{g.V.local(outE.count())}} is much different than {{g.V.outE.count()}}. Note 
that not ALL nested traversals are local. Look at {{TraversalParent}}. A 
{{TraversalParent}} step can have {{localChildren}} and {{globalChildren}}. 
Local children operate on one traverser at a time. Global operate on as you 
want -- the entire start iterator.



> Buffer input to inner traversals
> --------------------------------
>
>                 Key: TINKERPOP3-702
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-702
>             Project: TinkerPop 3
>          Issue Type: Improvement
>          Components: process
>            Reporter: Ran Magen
>
> In elastic-gremlin we implement an optimized VertexStep. Part of its job is 
> to batch/buffer/bulk different traversers and query them together in-order to 
> minizmize the number of queries. 
> You can see the implementation here: 
> https://github.com/rmagen/elastic-gremlin/blob/master/src/main/java/org/elasticgremlin/process/optimize/ElasticVertexStep.java#L36
> This works great in regular traversals, the "starts" iterator returns as many 
> traversers as the previous step gave out.
> But when the step is in an innerTraversal (e.g. 
> g.V().repeat(__.out()).times(8)), the "starts" iterator only returns one 
> traverser, and will return the next traverser only in the next call to 
> processNextStart. Thus, there is no way to run a bulk query.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to