Bug 53796

Summary: TestCompiler uses static Set which can grow huge
Product: JMeter Reporter: Sebb <sebb>
Component: MainAssignee: JMeter issues mailing list <issues>
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Sebb 2012-08-29 11:49:27 UTC
The TestCompiler uses a static Set (PAIRING) which can grow very large if there are lots of threads. This limits the total number of thread groups, even when using delayed start.

The Set is used to prevent a child being added to the same parent twice.

One possible solution is to save the information in the parent instance, rather than a static set. At the end of a thread, the parent instance will no longer be needed, and the memory can be reclaimed. [If there is still a reference to either parent or child, the memory won't be released, but that applies to the current implementation also.]

It's not clear whether there can ever be a duplicate ObjectPair, as most test elements are cloned. But in case duplicates are possible, something like the above solution is necessary.
Comment 1 Sebb 2012-08-30 00:31:16 UTC
Fixed as per description:

URL: http://svn.apache.org/viewvc?rev=1378780&view=rev
TestCompiler uses static Set which can grow huge
Bugzilla Id: 53796

    jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompilerHelper.java   (with props)