javeme commented on code in PR #2408:
URL:
https://github.com/apache/incubator-hugegraph/pull/2408#discussion_r1455493193
##########
hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/EdgeAPI.java:
##########
@@ -291,6 +291,19 @@ public String list(@Context GraphManager manager,
HugeGraph g = graph(manager, graph);
GraphTraversal<?, Edge> traversal;
+
+ // Optimize edge query. Return early when the EdgeLabel does not exist.
+ if (label != null && !g.existsEdgeLabel(label)) {
Review Comment:
We aim to optimize the scenario of adjacent edges query: such as
`g.V().out('follow')`, if the `g.V()` return a person v1 and a movie v2, the
movie vertex v2 has no 'follow' edge, so we don't need to query it from the
storage.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]