JDK-7073607 : EventDispatchThread.eventLog called improperly (eagerly formats messages)
Type:Bug
Component:client-libs
Sub-Component:java.awt
Affected Version:7
Priority:P5
Status:Closed
Resolution:Duplicate
OS:linux
CPU:x86
Submitted:2011-08-01
Updated:2014-09-23
Resolved:2014-09-23
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
In EventDispatchThread.java in JDK 7, eventLog is used improperly - log messages are preformatted even when they are due to be discarded (the normal case). This wastes time and churns the heap.
Comments
- this is an issue reported against 7(7u),
- there are now affected version 9 filed for this issue
- 7u issues are transferred to Sustaining
Nevertheless if someone have a report against 9 - please reopen and add affectedVersion 9
or
7u specific escalations might be reopen to Sustaining
10-08-2014
- this is an issue reported against 7(7u),
- there are now affected version 9 filed for this issue
- 7u issues are transferred to Sustaining
Nevertheless if someone have a report against 9 - please reopen and add affectedVersion 9
or
7u specific escalations might be reopen to Sustaining
10-08-2014
EVALUATION
The problem exists only for applications with turned on logging. This is not a production mode but development mode.
By the way can you provide any measures that show how huge the impact comparing to a build with your changes?
04-08-2011
SUGGESTED FIX
See attachment.
(By the way, why not use plain java.util.logging.Logger here? Surely java.util.** classes are "more basic" in a modularity sense than AWT.)
01-08-2011
PUBLIC COMMENTS
Noticed during https://netbeans.org/bugzilla/show_bug.cgi?id=200582 which perhaps involved some sort of event storm being created. Therefore most thread dumps showed EventDispatchThread busy in StringBuilder.append.