Are the developers of TinkerPop interested in the Performance difference on the equivalent queries?
Hi all! I was recently working on generating equivalent Gremlin queries to test TinkerGraph and then found that some of the equivalent queries had large runtime differences.
For example,
The two queries to select nodes with the red color are equivalent; however, their running times can vary significantly. For instance, if the number of red nodes is much smaller in the first query compared to the second one, the first query may produce a large number of intermediate results while the second query avoids this.
I noticed that TinkerGraph optimizes the traversal strategy at match time, which suggests that the queries in this simple example might be optimized. However, during my actual testing, I encountered some triggering test cases. Although I believe this behavior may be expected in Gremlin, I would like to reach out to the developers to inquire if they are interested in optimizing these queries further. In that case, I can share the test cases I found (which may not be as straightforward as this example, unfortunately :(, but I will try my best to reduce and simplify them ).
For example,
The two queries to select nodes with the red color are equivalent; however, their running times can vary significantly. For instance, if the number of red nodes is much smaller in the first query compared to the second one, the first query may produce a large number of intermediate results while the second query avoids this.
I noticed that TinkerGraph optimizes the traversal strategy at match time, which suggests that the queries in this simple example might be optimized. However, during my actual testing, I encountered some triggering test cases. Although I believe this behavior may be expected in Gremlin, I would like to reach out to the developers to inquire if they are interested in optimizing these queries further. In that case, I can share the test cases I found (which may not be as straightforward as this example, unfortunately :(, but I will try my best to reduce and simplify them ).