JDK-8095853 : Low effects performance with D3D9Ex enabled
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8u20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-04-22
  • Updated: 2015-06-12
  • Resolved: 2014-05-06
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 8
8u20Fixed
Related Reports
Relates :  
Description
When D3D9Ex is enabled (-DdisableD3D9Ex=false), there is a significant performance drop in rendering big number of effects per frame, this can be seen in HelloEffects by adding bechmarking via Scene.snapshot.
On the low-end machine, the hit is as much as 2.5 times.
The root cause of it is the much slower nGetAdapterOrdinal native method which calls D3D GetAdapterMonitor.
This method is repeatedly called by the GraphicsPipeline.getResourceFactory method.
We should cache the mapping between the Screen and adapter.
This is closely related to the RT-33475 and since we have stale Screens, we don't have a point where this cache can be cleaned.
OTOH, it probably can be safely cleaned on each screen configuration change.
Comments
Effectively fixed by the fix for RT-33475. nGetAdapterOrdinal now called only when screen configuration changes. Verified by the modified HelloEffects with repeated scene.snapshot() calls
06-05-2014

I suggest we clean the cache when any screen configuration changes. The cache will get repopulated quickly and be fast from that point on.
22-04-2014