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

Florian Hockmann commented on TINKERPOP-2065:
---------------------------------------------

I probably haven't enough knowledge of the server side of the traversal 
execution to fully grasp this as I haven't directly worked on that part yet, 
but couldn't we include the terminal step itself in the bytecode that gets sent 
to the server to indicate what needs to be returned? Currently, users for 
example basically have to include {{limit(1)}} if they only want to get one 
element back as {{next()}} still retrieves all elements from the server. 
{{g.V().next()}}, {{g.V().hasNext()}}, etc. are cheap to evaluate in general, 
but basically unusable from a GLV right now because of that.

This would of course mean that the traversal iteration wouldn't be completely 
client-side any more as the client would need to fetch additional elements from 
the server.

> Optimize iterate() for remote traversals
> ----------------------------------------
>
>                 Key: TINKERPOP-2065
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2065
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: dotnet, javascript, process, python
>    Affects Versions: 3.3.3
>            Reporter: stephen mallette
>            Assignee: stephen mallette
>            Priority: Critical
>
> In GLVs {{iterate()}} is not implemented as it is in Java where remote 
> traversals append a {{NoneStep}} to filter all results serverside and thus 
> generate side-effects. -Also, {{hasNext()}} is generally under-optimized in 
> remote traversals because the {{hasNext()}} check is on the client side - not 
> the server. We need a similar version of {{NoneStep}} for {{hasNext()}} 
> basically.-
> Nicely noted by [~Florian Hockmann] - 
> https://groups.google.com/d/msgid/gremlin-users/8044fcf4-8941-4826-998b-3743154dccd2%40googlegroups.com?utm_medium=email&utm_source=footer



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

Reply via email to