JanusGraph / JanusGraph/janusgraph
values().profile() much slower than valueMap().profile() when `query.batch` is disabled
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
```groovy
graph = JanusGraphFactory.open("inmemory")
g = graph.traversal()
for (i = 0; i < 100; i++) {
g.addV().property("prop", "value").iterate();
}
g.V().valueMap().profile()
g.V().values().profile()
```
Tested on 0.6.0 SNAPSHOT version.


caused by
https://github.com/JanusGraph/janusgraph/blob/6b6371d6f18ebf1d32c68254e87d238bb7528869/janusgraph-core/src/main/java/org/janusgraph/graphdb/tinkerpop/optimize/JanusGraphLocalQueryOptimizerStrategy.java#L108-L110
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported profiles with the Groovy snippet and query.batch disabled. Inspect JanusGraphLocalQueryOptimizerStrategy.java around lines 108-110, then trace the differing values() and valueMap() paths. Done means the reported profiling performance discrepancy is addressed and verified against this reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- databases, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100