JDK-6480051 : GraphicsExpose events generated by X11 Pixmap Blits
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris
  • CPU: generic
  • Submitted: 2006-10-10
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
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 6 JDK 7
6u2Fixed 7 b03Fixed
Description
In doing some remote X11 testing over a DSL line (6megabit down, 600kilobit up)
I noticed that benchmarks which render lots of managed images would complete all
of the blits and then spend several seconds after the last blit transferring
network traffic before a Toolkit.sync() would finish.

This traffic appears to be X11 NoExpose events being returned to the client
for each such Blit.

Comments
EVALUATION Setting GraphicsExposures to False has a significant impact on performance over a low bandwidth connection (even DSL at 6 Megabit down, 600 Kilobit up). Raw blitting benchmarks improved by as much as 2 to 2.5 times and some Swing widgets were perhaps 20% faster (Swing does a lot more work than just blitting images). As always, your mileage may vary depending on the speed of your connection (both upload and download) and how intensely the application relies on blitting managed or volatile images.
10-10-2006

EVALUATION In looking at our usage of X11 GCs it looks like we rely on the default setting of the GraphicsExposures attribute which defaults to True. With that setting any XCopyArea request will result in an event sent back to the client, even if there were no conditions that should result in an exposure (in that case a special NoExpose event is generated so that clients can associate a 1:1 mapping between XCopyArea requests and the associated events that they generate). While the XCopyArea that is used during scrolling operations (i.e. the ones that come from a Graphics.copyArea() method call) should result in exposure events so that damage handling due to obscured scroll and copyarea operations will operate properly, the XCopyArea calls used to perform Pixmap blits for managed and accelerated images do not need these events and so should be executed with the GraphicsExposures turned off.
10-10-2006