[ 
https://issues.apache.org/jira/browse/TINKERPOP3-957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Wilmes updated TINKERPOP3-957:
----------------------------------
    Attachment: addVBaseline.svg

Attaching this baseline performance flamegraph for documentation purposes.  It 
was generated while running 100,000 inserts using addV.

{code:java}
testAddV = { num -> graph = TinkerGraph.open(); g = graph.traversal(); for (i = 
0; i < num; i++) { g.addV(id, i).next() } }
{code}

Review of this and yourkit output highlights a number of areas that can be 
updated without making any structural changes to the code.  In particular, 
strategy application and retrieval of traversal requirements appear to be 
taking a large percentage of the time.  A good chunk of this appears to be due 
to repeated initialization and processing of Java streams.  I'll address these 
and a few other areas in a PR shortly and see what you guys think.

> 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)

Reply via email to