United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6616323 consider benefits of replacing a componen array with other collection from the awt.Container class
6616323 : consider benefits of replacing a componen array with other collection from the awt.Container class

Details
Type:
Enhancement
Submit Date:
2007-10-12
Status:
Closed
Updated Date:
2011-05-18
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
client-libs
OS:
windows_2000
Sub-Component:
java.awt
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7

Related Reports
Backport:
Relates:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
java.awt.Container class stores all children in an array of Components:
1) its initial size is 0;
2) on changing the hierarchy of components (add/remove) it addresses the Arrays.copy(args) method;

                                    

Comments
EVALUATION

There is no visible improvements with startup2 and startup3 but it does observed with swingmark if Container use ArrayList instead of plaing array.
C:\ad153231\refworkload_1>efworkload_1\results\swingmark\comp_array_original_1 C
============================================================================
esults\swingmark  Benchmark         Samples        Mean     Stdev             Ge
omean Weight
  swingmark              30      907.52      3.77
============================================================================
esults\swingmark  Benchmark         Samples        Mean     Stdev   %Diff    P
 Significant
  swingmark              30      881.36      4.33   -2.88 0.000          Yes
============================================================================
  * - Not Significant: The %Diff for the mean could be noise. If there is
      an actual difference, more samples would be needed to detect it.
                                     
2008-01-25
SUGGESTED FIX

http://spbweb.russia.sun.com/~ad153231/startup/webrev.6616323.replace_array/
                                     
2007-12-27
EVALUATION

List collection might be applied. Performance testing should be accomplished to choose better collection type.
                                     
2007-12-27



Hardware and Software, Engineered to Work Together