United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6539061 Cross platform print dialog slow first time because of call to GraphicsDevice.getConfigurations()
JDK-6539061 : Cross platform print dialog slow first time because of call to GraphicsDevice.getConfigurations()

Details
Type:
Bug
Submit Date:
2007-03-26
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
client-libs
OS:
generic
Sub-Component:
2d
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:

Sub Tasks

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()
                                     
2007-03-26



Hardware and Software, Engineered to Work Together