Github user dkuppitz commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/830#discussion_r179848121
--- Diff:
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
---
@@ -362,7 +360,7 @@ private boolean hasPathLabel(final Path path, final
Set<String> labels) {
while (true) {
if (this.first) {
this.first = false;
-
this.initializeMatchAlgorithm(TraversalEngine.Type.STANDARD);
+ this.initializeMatchAlgorithm(true);
--- End diff --
It's not bad. I don't fully understand the code in `CountMatchAlgorithm`
(the only place where the boolean flag makes a difference), but it seems like
it only reorders the match traversals, possibly to optimize memory consumption
and/or processing time.
---