Application of traversal strategies taking >6x longer than traversal execution
Has any providers dealt with traversal strategies taking a really long time in large nested traversals (nested with coalesce branches)? Just the default tinkerpop strategies are taking >120 ms to apply while the query executes in ~20 ms.
I looked through and found it is the recurse applyTraversal function which I am thinking of rewriting with some other code but I don't know if it will be much faster. I figured other providers must have dealt with this as well.
Solution:Jump to solution
there are two fixes landing for this issue in 3.5.6/3.6.3 - these are the two PRs that are relevant: https://github.com/apache/tinkerpop/pull/2009 and https://github.com/apache/tinkerpop/pull/2026
GitHub
TINKERPOP-2919 Improve performance of FilterRankingStrategy by spma...
https://issues.apache.org/jira/browse/TINKERPOP-2919
Shortcut some of the recursion in the strategy with a cache that basically captures TraversalParent information formerly calculated and recalcul...
GitHub
TINKERPOP-2855 Refactored strategy application by spmallette · Pull...
https://issues.apache.org/jira/browse/TINKERPOP-2855
https://issues.apache.org/jira/browse/TINKERPOP-2888
Removed some recursion. Added Traversal.lock() to offer a formal way to finalize a traversa...
6 Replies
Solution
there are two fixes landing for this issue in 3.5.6/3.6.3 - these are the two PRs that are relevant: https://github.com/apache/tinkerpop/pull/2009 and https://github.com/apache/tinkerpop/pull/2026
GitHub
TINKERPOP-2919 Improve performance of FilterRankingStrategy by spma...
https://issues.apache.org/jira/browse/TINKERPOP-2919
Shortcut some of the recursion in the strategy with a cache that basically captures TraversalParent information formerly calculated and recalcul...
GitHub
TINKERPOP-2855 Refactored strategy application by spmallette · Pull...
https://issues.apache.org/jira/browse/TINKERPOP-2855
https://issues.apache.org/jira/browse/TINKERPOP-2888
Removed some recursion. Added Traversal.lock() to offer a formal way to finalize a traversa...
Oh wow, you are already on it hahaha. Cool I will have a look at this, thanks Stephen
I just noticed that you just opened this, that is pretty ironic timing
well, it's been known for a bit now. janusgraph reported it first a few weeks back, but the reports have kept coming in since
I am going to give your branch a test on my query and see the performance delta
So your branch takes my queries compile time on my local computer from >120ms to 10 ms. Pretty darn good improvement!
thanks for confirming that