You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Ken Hu (Jira)" <ji...@apache.org> on 2024/08/03 05:23:00 UTC
[jira] [Commented] (TINKERPOP-3100) Traversal.Admin.lock() has excessive recursion
[ https://issues.apache.org/jira/browse/TINKERPOP-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17870662#comment-17870662 ]
Ken Hu commented on TINKERPOP-3100:
-----------------------------------
I ran a similar example on x86 and noticed a comparable performance loss. Because this is a performance issue, I increased the priority to critical so that it hopefully gets addressed in the next release.
> Traversal.Admin.lock() has excessive recursion
> ----------------------------------------------
>
> Key: TINKERPOP-3100
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3100
> Project: TinkerPop
> Issue Type: Bug
> Components: console, process
> Affects Versions: 3.7.2
> Environment: M1 Macbook, 16GB RAM
> Reporter: Cameron Fiander
> Priority: Critical
> Labels: performance
>
> Hi, we are currently upgrading to TinkerPop 3.7, and noticed that some of our larger queries were taking much longer than expected to applyStrategies / lock.[ I've created an example project with a contrived complex traversal that reproduces the issue|https://github.com/camfiander-sonrai/TinkerPopLockPerformanceRepro].
> I noticed that many of the children steps were getting locked more than once, which shouldn't be necessary. I think the problem is [here|https://github.com/apache/tinkerpop/blob/3.7.2/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversal.java#L333]. {{{}applyTraversalRecursively{}}}, called from the traversal root, should apply the {{lock()}} to all children, grandchildren, and so on. But each child also calls {{{}applyTraversalRecursively{}}}, meaning the number of times a step is locked scales with the depth of the traversal.
> {code:java}
> # TinkerPop 3.5.3
> Applied strategies in PT3.695S
> # TinkerPop 3.7.2
> Applied strategies in PT15.079S{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)