United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7105529 XAWT: Optimize getFieldsAsString() methods generated by WrapperGenerator
JDK-7105529 : XAWT: Optimize getFieldsAsString() methods generated by WrapperGenerator

Details
Type:
Bug
Submit Date:
2011-10-27
Status:
Resolved
Updated Date:
2013-07-10
Project Name:
JDK
Resolved Date:
2011-11-16
Component:
client-libs
OS:
generic
Sub-Component:
java.awt
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

Description
The issue is related to 7104625.

WrapperGenerator is used to generate XEvent and its descendant classes. All of the generated classes contain a getFieldsAsString() method used to get their string representation. These methods use string concatenation with the "+" operator which leads to huge overhead in terms of memory usage.

                                    

Comments
EVALUATION

The methods should use the StringBuilder class to avoid wasting memory.
                                     
2011-10-27
EVALUATION

More info available at the following mail thread:
http://mail.openjdk.java.net/pipermail/awt-dev/2011-October/001952.html
                                     
2011-10-27



Hardware and Software, Engineered to Work Together