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

ASF GitHub Bot commented on TINKERPOP-1292:
-------------------------------------------

GitHub user okram opened a pull request:

    https://github.com/apache/tinkerpop/pull/476

    TINKERPOP-1292: TinkerGraphComputer VertexProgramInterceptors

    https://issues.apache.org/jira/browse/TINKERPOP-1292
    
    Added `TinkerGraphCountStrategy` which will translate `g.V().count()` and 
`g.E().count()` into direct calls to the underlying 
`TinkerGraph.vertices/edges` hash maps (`.size()`). Thus, no need to iterate 
out the vertices/edges and then count the iteration. O(1) time for count.
    
    --- we can extend on this line of reasoning in this branch if people have 
other ideas for shortcuts.
    
    * Also did some cleanup of some test suites in Neo4jGraph and TinkerGraph 
that should have been removed long ago when their respective strategy suites 
were removed.
    
    VOTE +1.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-1292

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/476.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 #476
    
----
commit 0ea3b5e26e76919d080fe224b1b727a132c4b829
Author: Marko A. Rodriguez <[email protected]>
Date:   2016-11-01T21:24:18Z

    added TinkerCountGlobalStep and TinkerGraphCountStrategy which will turn 
g.V().count() and g.E().count() into direct calls to the .size() of the 
underlying TinkerGraph.vertices/edges Maps. Removed the OptIn strategy suites 
in both TinkerGraph and Neo4jGraph -- this should have been done when these 
suites were removed long ago.

----


> TinkerGraphComputer VertexProgramInterceptors
> ---------------------------------------------
>
>                 Key: TINKERPOP-1292
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1292
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process, tinkergraph
>    Affects Versions: 3.2.0-incubating
>            Reporter: Marko A. Rodriguez
>             Fix For: 3.2.4
>
>
> Create {{TinkerGraphInterceptorStrategy}} for {{TinkerGraphComputer}} and 
> grow it starting with the two simple patterns below:
> {code}
> g.V().count() -> tinkerGraph.vertices.size()
> g.E().count() -> tinkerGraph.edges.size()
> {code}
> In fact, perhaps even create {{TinkerGraphCountStep}} for OLTP as well that 
> does the above.



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

Reply via email to