rajat315315 opened a new issue, #6720:
URL: https://github.com/apache/jmeter/issues/6720

   ### Use case
   
   ### Description
   In JMeter, when a sampler fails with `onErrorStartNextLoop` enabled, or when 
loop logical actions (such as Break/Continue) are triggered, JMeter is forced 
to find the parent controller hierarchy from the current sampler up to the 
thread group root. 
   
   Currently, this is done by executing `testTree.traverse()` with a 
`FindTestElementsUpToRootTraverser` every time the loop action is triggered. 
For large test plans with deep nesting structures, this full DFS tree walk is 
highly redundant since the test tree's hierarchical structure does not change 
during the execution run. This leads to severe performance degradation and high 
CPU usage under high-failure loads.
   
   
   
   ### Possible solution
   
   
   ### Proposed Improvement
   Add a thread-local parent controller path cache (`Map<Sampler, 
List<Controller>>`) inside `JMeterThread`. When resolving parent controllers:
   1. Query the map to see if the sampler's parent controllers list has already 
been resolved.
   2. If it is a cache miss, perform the `testTree.traverse()` once and store 
the result.
   3. If it is a cache hit, return a lightweight mock traverser containing the 
cached controllers list directly, completely skipping the expensive DFS tree 
traversal.
   
   ### Possible workarounds
   
   _No response_
   
   ### JMeter Version
   
   6.0.0-SNAPSHOT
   
   ### Java Version
   
   _No response_
   
   ### OS Version
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to