JDK-2216217 : sun.awt.X11.XEvent is creating 600 MB of char[] for no good reason
  • Type: Backport
  • Backport of: JDK-7104625
  • Component: client-libs
  • Sub-Component: java.awt
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2011-10-25
  • Updated: 2012-01-30
  • Resolved: 2012-01-30
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.

To download the current JDK release, click here.
JDK 7 JDK 8
7u4 b06Fixed 8Fixed
Comments
EVALUATION http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/9cc780355c09
13-12-2011

EVALUATION See parent CR and the Suggested Fix.
26-10-2011

SUGGESTED FIX diff -r f218e6bdf1e8 -r 0cfee23bbd5c src/solaris/classes/sun/awt/X11/XComponentPeer.java --- a/src/solaris/classes/sun/awt/X11/XComponentPeer.java +++ b/src/solaris/classes/sun/awt/X11/XComponentPeer.java @@ -466,12 +466,16 @@ if (true) { switch(e.getID()) { case PaintEvent.UPDATE: - log.finer("XCP coalescePaintEvent : UPDATE : add : x = " + + if(log.isLoggable(PlatformLogger.FINER)) { + log.finer("XCP coalescePaintEvent : UPDATE : add : x = " + r.x + ", y = " + r.y + ", width = " + r.width + ",height = " + r.height); + } return; case PaintEvent.PAINT: - log.finer("XCP coalescePaintEvent : PAINT : add : x = " + + if(log.isLoggable(PlatformLogger.FINER)) { + log.finer("XCP coalescePaintEvent : PAINT : add : x = " + r.x + ", y = " + r.y + ", width = " + r.width + ",height = " + r.height); + } return; } } @@ -1248,7 +1252,9 @@ * ButtonPress, ButtonRelease, KeyPress, KeyRelease, EnterNotify, LeaveNotify, MotionNotify */ protected boolean isEventDisabled(XEvent e) { - enableLog.finest("Component is {1}, checking for disabled event {0}", e, (isEnabled()?"enabled":"disable")); + if(enableLog.isLoggable(PlatformLogger.FINEST)) { + enableLog.finest("Component is {1}, checking for disabled event {0}", e, (isEnabled()?"enabled":"disable")); + } if (!isEnabled()) { switch (e.get_type()) { case XConstants.ButtonPress: @@ -1258,7 +1264,9 @@ case XConstants.EnterNotify: case XConstants.LeaveNotify: case XConstants.MotionNotify: - enableLog.finer("Event {0} is disable", e); + if(enableLog.isLoggable(PlatformLogger.FINER)) { + enableLog.finer("Event {0} is disable", e); + } return true; } }
26-10-2011