JDK-6539061 : Cross platform print dialog slow first time because of call to GraphicsDevice.getConfigurations()
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-03-26
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
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 b14Fixed
Description
Using JDK 1.6 my XP PC the cross-platform print dialog is taking a long time
to display first time. I initially put this down to non-existent and
network printers. But on investigation it seems we are tripping over
6477756: GraphicsDevice.getConfigurations() is slow taking 3 or more seconds
In fact on my system it was taking 6.7 seconds for each of the 2 cards.
That's 13 additional seconds a user sits waiting for the dialog to appear.

The reason its called is to get the bounds of all devices to fix
4929299: Dialog is not positioned properly if the coords are invalid, on Win32.

But in fact since the bounds are the same on all configs for each device,
we can just get the bounds for the default configuration. This takes no detectable
time at all.

Comments
EVALUATION Use GraphicsDevice.getDefaultConfiguration().getBounds()
26-03-2007