You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Norio Akagi (Jira)" <ji...@apache.org> on 2020/09/14 23:38:00 UTC
[jira] [Created] (TINKERPOP-2422) LABELED_PATH does not need to be
added when a step label is not consumed
Norio Akagi created TINKERPOP-2422:
--------------------------------------
Summary: LABELED_PATH does not need to be added when a step label is not consumed
Key: TINKERPOP-2422
URL: https://issues.apache.org/jira/browse/TINKERPOP-2422
Project: TinkerPop
Issue Type: Improvement
Components: process
Reporter: Norio Akagi
Currently `LABELED_PATH` requirement is added whenever a step under the traversal has any step label.
But if the step label specified is not used, we actually don't need the requirement.
By omitting unnecessary requirement we should be able to have some sort of performance gain (it varies depending on how query engine layer deals with TraverserRequirements).
To achieve this, we may need some concise way to detect if following steps after the one produces the step label actually uses the label. Checking step one by one (e.g. `WherePredicateStep`, `PathStep`, etc) is error-prone and we may forget to add the handling when we add a new Step that consumes a step label.
I talked with [~divijvaidya] and possibly we can utilize `PATH` requirement - so whenever a step touches the labeled path the step adds `PATH` requirement to itself, then we can set `LABELED_PATH` req only when following steps has `PATH` requirement. More precisely it'd be better if we can retrieve what step label is used in a single common method and see the exact label used.
Please let me know how you think.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)