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

stephen mallette commented on TINKERPOP-1882:
---------------------------------------------

I've often thought about a strategy like that. I guess 
{{g.V(a).out().valueMap().limit(123)}} will include a {{barrier(2500)}} after 
{{out()}} only to have it {{limit(123)}} later. Without the {{barrier(2500)}} 
the traversal wouldn't add any extra processing that wasn't necessary, correct?

> Apply range and limit steps as early as possible
> ------------------------------------------------
>
>                 Key: TINKERPOP-1882
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1882
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.2.7, 3.3.1
>            Reporter: Florian Hockmann
>            Priority: Minor
>
> For a traversal like
> {{g.V(a).out().valueMap().limit(123)}}
> we can simply move the {{limit()}} to the left so we get:
> {{g.V(a).out().limit(123).valueMap()}}
> This avoids unnecessary database lookups.
> We should create a strategy that moves the {{limit}} and the {{range}} step 
> like this to _the left_  for all {{map}} steps.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to