[ https://issues.apache.org/jira/browse/TINKERPOP-1822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16530124#comment-16530124 ]
stephen mallette commented on TINKERPOP-1822: --------------------------------------------- I added three JFRs for analysis - one for each mode of execution that we discussed. The JFRs align to these scripts: {code} // default.jfr (i.e. let strategies do their thing) graph = TinkerGraph.open() graph.io(gryo()).readGraph("data/grateful-dead.kryo") g = graph.traversal() Thread.sleep(3000) start = System.currentTimeMillis() counter = 0 while (System.currentTimeMillis() - start < 180000) { g.V().repeat(out()).times(3).iterate() counter++ } println counter {code} {code} // dfs graph = TinkerGraph.open() graph.io(gryo()).readGraph("data/grateful-dead.kryo") g = graph.traversal() Thread.sleep(3000) start = System.currentTimeMillis() counter = 0 while (System.currentTimeMillis() - start < 180000) { g.withoutStrategies(LazyBarrierStrategy,RepeatUnrollStrategy).V().repeat(out()).times(3).iterate() counter++ } println counter {code} {code} // bfs graph = TinkerGraph.open() graph.io(gryo()).readGraph("data/grateful-dead.kryo") g = graph.traversal() Thread.sleep(3000) start = System.currentTimeMillis() counter = 0 while (System.currentTimeMillis() - start < 180000) { g.withoutStrategies(LazyBarrierStrategy,RepeatUnrollStrategy).V().repeat(out().barrier()).times(3).iterate() counter++ } println counter {code} All three scripts execute the same traversal as many times as possible for 3 minutes. The difference in performance is stark: {code} default: 62k ops bfs: 494 ops dfs: 17 ops {code} Before I say too much about the JFRs themselves, what do folks think about this test itself and the basic outcome? > Repeat should depth first search > -------------------------------- > > Key: TINKERPOP-1822 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1822 > Project: TinkerPop > Issue Type: Improvement > Components: process > Affects Versions: 3.3.0, 3.2.6 > Reporter: Robert Dale > Priority: Major > Attachments: bfs.jfr, default.jfr, dfs.jfr > > > Perhaps optionally. > See also: > * https://groups.google.com/forum/#!topic/gremlin-users/gLSLxH_K-wE > * https://github.com/apache/tinkerpop/pull/715 -- This message was sent by Atlassian JIRA (v7.6.3#76005)