JanusGraph / JanusGraph/janusgraph
Longer Traversals On JanusGraph Seem To Be Slower Since Titan
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
Hi All,
We have recently realised that our longer traversals have become slower since switching from Titan to JanusGraph and we are trying to debug why. To do this we have been comparing the traversal plans with the following test code:
```
GraphTraversal traversal = graph.traversal().V().out().as("a").out().select("a").in().in().in();
traversal.asAdmin().applyStrategies();
System.out.println(traversal);
```
With JanusGraph this traversal gives us:
```
[JanusGraphStep(vertex,[]), JanusGraphVertexStep(OUT,vertex), NoOpBarrierStep(2500)@[a], JanusGraphVertexStep(OUT,vertex), SelectOneStep(a), NoOpBarrierStep(2500), JanusGraphVertexStep(IN,vertex), NoOpBarrierStep(2500), JanusGraphVertexStep(IN,vertex), NoOpBarrierStep(2500), JanusGraphVertexStep(IN,vertex)]
```
And with titan you get:
```
[TitanGraphStep([],vertex), TitanVertexStep(OUT,vertex)@[a], TitanVertexStep(OUT,vertex), SelectOneStep(a), TitanVertexStep(IN,vertex), TitanVertexStep(IN,vertex), TitanVertexStep(IN,vertex)]
```
The latest Tinkerpop/JanusGraph seems to have added a lot of `BarrierSteps` and we think this seems to be causing our performance troubles.
Can anyone enlighten us on why these BarrierSteps were introduced and if maybe there is a way around them?
Contributor guide
Research direction
No repository files or tests are named. Reproduce the supplied Java traversal with JanusGraph and compare the generated traversal plans against the Titan output, focusing on when the BarrierSteps appear. Done would require identifying the cause of the performance difference and documenting a supported way to avoid or mitigate it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100