[
https://issues.apache.org/jira/browse/TINKERPOP3-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15006848#comment-15006848
]
ASF GitHub Bot commented on TINKERPOP3-957:
-------------------------------------------
Github user okram commented on the pull request:
https://github.com/apache/incubator-tinkerpop/pull/144#issuecomment-157084517
I ran `mvn clean install` and everything passed. I reviewed the code and
these are very simple changes to our `TraversalHelper`/`DefaultTraversal`
classes. For example, replacing `Stream` with `for-loop` is always good. Given
that these methods are so core to everything traversal, making these as fast as
possible is smart. Thus, this is a really useful PR. Hopefully we can expose
more performance problem areas and address them much like this ticket.
VOTE +1.
> Improve speed of addV()
> -----------------------
>
> Key: TINKERPOP3-957
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-957
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.0.2-incubating
> Reporter: stephen mallette
> Assignee: Marko A. Rodriguez
> Fix For: 3.1.1-incubating
>
> Attachments: addVBaseline.svg
>
>
> The performance gap between {{GraphTraversalSource.addV()}} and
> {{Graph.addVertex()}} is fairly wide:
> {code}
> gremlin> testAddV = { num -> graph = TinkerGraph.open(); g =
> graph.traversal(); for (i = 0; i < num; i++) { g.addV(id, i).next() } }
> ==>groovysh_evaluate$_run_closure1@30b9eadd
> gremlin> testAddVertex = { num -> graph = TinkerGraph.open(); for (i = 0; i
> < num; i++) { graph.addVertex(id, i) } }
> ==>groovysh_evaluate$_run_closure1@2e647e59
> gremlin> clock {testAddV(100000)}
> ==>462.04376528
> gremlin> clock {testAddVertex(100000)}
> ==>70.90365949999999
> {code}
> Try to make some improvements there. Perhaps this work should also extend to
> {{addE/addEdge}} as well.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)