Skip to content

Conversation

@okram
Copy link
Contributor

@okram okram commented Nov 1, 2016

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.

…urn 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.
@twilmes
Copy link
Contributor

twilmes commented Nov 2, 2016

VOTE: +1

@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_INTEGRATE)
@Graph.OptIn(Graph.OptIn.SUITE_GROOVY_ENVIRONMENT_PERFORMANCE)
@Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.NativeNeo4jSuite")
@Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.process.traversal.strategy.Neo4jStrategySuite")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, when did we drop these? Was it a long time ago?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It is not the model we use for TraversalStrategy testing. I converted both Neo4j and TinkerGraph's strategy tests to the model we use in core/.

@spmallette
Copy link
Contributor

All tests pass with docker/build.sh -t -n -i

VOTE +1

@asfgit asfgit merged commit 3badc8e into tp32 Nov 4, 2016
@asfgit asfgit deleted the TINKERPOP-1292 branch February 21, 2017 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants