jsalvata    2004/02/05 01:51:29

  Modified:    src/core/org/apache/jmeter/testbeans/gui TestBeanGUI.java
  Log:
  Reduce memory usage for non-shared bean customizers.
  
  Revision  Changes    Path
  1.11      +6 -3      
jakarta-jmeter/src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java
  
  Index: TestBeanGUI.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TestBeanGUI.java  30 Jan 2004 11:30:00 -0000      1.10
  +++ TestBeanGUI.java  5 Feb 2004 09:51:29 -0000       1.11
  @@ -74,6 +74,7 @@
   
   import javax.swing.JPopupMenu;
   
  +import org.apache.commons.collections.LRUMap;
   import org.apache.jmeter.assertions.Assertion;
   import org.apache.jmeter.config.ConfigElement;
   import org.apache.jmeter.control.Controller;
  @@ -139,9 +140,11 @@
       private Customizer customizer= null;
   
       /**
  -     * TestElement to Customizer map if customizer is null.
  +     * TestElement to Customizer map if customizer is null. This is necessary to 
avoid
  +     * the cost of creating a new customizer on each edit. The cache size needs to 
be
  +     * limited, though, to avoid memory issues when editing very large test plans.
        */
  -    private Map customizers= new HashMap();
  +    private Map customizers= new LRUMap(20);
   
       /**
        * Index of the customizer in the JPanel's child component list:
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to