Github user dkuppitz commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/621#discussion_r122736897
--- Diff:
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalRing.java
---
@@ -62,6 +62,10 @@ public void addTraversal(final Traversal.Admin<A, B>
traversal) {
this.traversals.add(traversal);
}
+ public void setTraversal(final int index, final Traversal.Admin<A, B>
traversal) {
--- End diff --
Yea, it would be cleaner, but with indexing it's much faster as you don't
have to search the whole `TraversalRing` for a specific traversal. I know, the
ring will usually contain only a few traversals, but well.... It's `O(1)` vs.
`O(n)`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---