JanusGraph / JanusGraph/janusgraph

values().profile() much slower than valueMap().profile() when `query.batch` is disabled

Open
#2,185 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted kind/bug/possible kind/performance
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.
![image](https://user-images.githubusercontent.com/25746010/90325671-0b4ca800-dfb1-11ea-85a0-6107d0ba603c.png)
![image](https://user-images.githubusercontent.com/25746010/90325673-14d61000-dfb1-11ea-85d8-9460ea5fcfde.png)

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.