United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6891435 Improve D3D preloading
JDK-6891435 : Improve D3D preloading

Details
Type:
Enhancement
Submit Date:
2009-10-14
Status:
Closed
Updated Date:
2011-01-19
Project Name:
JDK
Resolved Date:
2010-01-13
Component:
client-libs
OS:
windows
Sub-Component:
java.awt
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u18
Fixed Versions:
6u18 (b04)

Related Reports
Backport:
Relates:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
Fix for 6867515 added "D3D preload" feature.
Currently it includes creation of "main" Direct3D object (IDirect3D9)
Additional research shown that 2nd delay in D3D initialization occurs on creation/initialization of D3D Adapter objects (implemented in D3DContext class).
This delay becomes longer when D3D Adapter are created after some period of time after IDirect3D9 creation and this fact causes decreasing of performance improvement due D3D preload (for example plugins require more time for initializetion and in this case time period between IDirect3D9 creation & D3DAdapter creation often is too big).
D3DPipelineManager supports caching of D3DContext (when D3DContext for some adapter is requested, D3DPipelineManager returns existing object if it was created before), so we can do creation/initialization of D3DContext objects during preloading.

                                    

Comments
EVALUATION

should be fixed to get additional performance increase.
                                     
2009-10-14
EVALUATION

Improvement measurement results:
Hi-end system, (6867515 fix made unsignificant improvement on the system):
==============================================================================
results.6u18b04/no_preload:
  Benchmark           Samples        Mean     Stdev             Geomean Weight
    app_awt                20      268,65     40,88             0,25      
    app_swing              20      291,45     10,46             0,25      
    app_swing_jws          20      526,45     20,33             0,25      
    applet_swing_jpi       20      588,40     19,32             0,25      
==============================================================================
results.6u18b04/preload:
  Benchmark           Samples        Mean     Stdev   %Diff     P  Significant
    app_awt                20      170,40      8,75   36,57 0,000          Yes
    app_swing              20      191,45      6,98   34,31 0,000          Yes
    app_swing_jws          20      468,70     35,72   10,97 0,000          Yes
    applet_swing_jpi       20      504,00     13,65   14,34 0,000          Yes
==============================================================================

Middle-end system:
==============================================================================
results.6u18b04/no_preload/:
  Benchmark           Samples        Mean     Stdev             Geomean Weight
  startup2                 20      544,35      7,25            
    app_awt                20      362,40     18,80             0,17      
    app_swing              20      399,20     38,41             0,17      
    app_swing_jws          20      753,85     18,89             0,17      
    applet_awt             20      492,25     12,76             0,17      
    applet_swing           20      536,80     10,32             0,17      
    applet_swing_jpi       20      904,65     36,74             0,17      
==============================================================================
results.6u18b04/preload/:
  Benchmark           Samples        Mean     Stdev   %Diff     P  Significant
  startup2                 20      468,53     10,22   13,93 0,000          Yes
    app_awt                20      250,80     15,61   30,79 0,000          Yes
    app_swing              20      284,60     17,13   28,71 0,000          Yes
    app_swing_jws          20      685,95     28,58    9,01 0,000          Yes
    applet_awt             20      489,75      7,72    0,51 0,459            *
    applet_swing           20      539,15     10,75   -0,44 0,485            *
    applet_swing_jpi       20      815,60     20,57    9,84 0,000          Yes
==============================================================================

results for middle-end system without the fix (unfortunately compare doesn't work due test sets are different):
==============================================================================
workload.results/6u18_b03/preload:
  Benchmark           Samples        Mean     Stdev             Geomean Weight
  startup2                 20      495,73      8,79            
    app_awt                20      349,30     15,56             0,20      
    app_swing              20      387,45     18,18             0,20      
    applet_awt             20      497,65     37,77             0,20      
    applet_swing           20      529,60     14,10             0,20      
    applet_swing_jpi       20      842,95     19,23             0,20      
==============================================================================
                                     
2009-10-16
EVALUATION

applet_awt & applet_swing tests use appletviewer to run applets.
appletviewer doesn't use preload mechanism so there is no improvement in the tests.
To evaluate plugin improvement applet_swing_jpi (which uses browser) should be considered.
                                     
2009-10-16
EVALUATION

The fix changes enabling/disabling algorithm for AWT warmup (vs fix for 6867515):
- for applications (java/javaw) "-Dsun.awt.warmup=true" JVM parameter turns AWT warmup on;
- javaws/plugins always add the parameter launching JVM (so warmup is turned on for javaws/plugin by default).

J2D_D3D_PRELOAD env. variable (values: true/false) TAKES PRECEDENCE of "-Dsun.awt.warmup" JMV parameter, so setting J2D_D3D_PRELOAD to "false" disables AWT warmup for javaws/plugin too.

The following settings can disable warmup (regardless of "-Dsun.awt.warmup" and "J2D_D3D_PRELOAD" values):
- "-Dsun.java2d.noddraw=true" JVM parameter;
- "-Dsun.java2d.d3d=false" JVM parameter;
- "-Dsun.java2d.opengl=true" JVM parameter;
if none of the "-Dsun.java2d.noddraw" "-Dsun.java2d.d3d", "-Dsun.java2d.opengl" parameters are specified,  "J2D_D3D" env. variable is tested; if it is set to "false", the warmup is disabled.
                                     
2009-10-19
EVALUATION

http://hg.openjdk.java.net/jdk7/build/jdk/rev/1f45c4c1f3a7
                                     
2010-12-04



Hardware and Software, Engineered to Work Together