JanusGraph / JanusGraph/janusgraph

Optimize label retrieval

Open
#1,709 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

Any time when [AbstractVertex](https://github.com/JanusGraph/janusgraph/blob/master/janusgraph-core/src/main/java/org/janusgraph/graphdb/vertices/AbstractVertex.java#L125)
.label() method is to invoked it lead to expensive query [constructQueryWithoutProfile](https://github.com/JanusGraph/janusgraph/blob/master/janusgraph-core/src/main/java/org/janusgraph/graphdb/query/vertex/BasicVertexCentricQueryBuilder.java#L417)

But this type of query may be evaluted one time and reused

Contributor guide

Open the contributing guide

Research direction

Start in janusgraph-core/src/main/java/org/janusgraph/graphdb/vertices/AbstractVertex.java at label(), then inspect constructQueryWithoutProfile in janusgraph-core/src/main/java/org/janusgraph/graphdb/query/vertex/BasicVertexCentricQueryBuilder.java. Determine how the expensive label query is constructed and whether its result can be evaluated once and reused. Done means repeated label() calls avoid redundant query evaluation without changing label behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
database
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.