I have a directed graph with around 1000 vertices and 3000 edges that contains cycles.
I am trying to find all downstream (out) paths from given Vertex.
When using following Gremlin query
g.V(45712).repeat(out().simplePath()).until(outE().count().is(0)).path()
For some paths it takes forever to get the result because of the cycles, although the simplePath step should prevent this.
I tried to optimize the query and not go over the same Vertex twice using aggregate step and without, but now some Vertices are being skipped.
g.V(45712).repeat(out().where(without('x'))
.aggregate(Scope.local,'x'))
.until(outE().count().is(0))
.path()
Thanks