JDK-8115833 : 8.0-graphics-scrum-h595: 42% performance regression in Guimark2.BitmapCanvas
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2013-01-29
  • Updated: 2015-06-17
  • Resolved: 2013-02-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 8
8Resolved
Related Reports
Blocks :  
Description
There is 42% performance regression in Guimark2.BitmapCanvas on Windows-Mid-Range machine first appeared in
build 8.0-graphics-scrum-h595. The results are:
 #594: 14.42 fps
 #595:  8.43 fps

8.0-graphics-scrum-h595 contains the only following fix:
 Fix RT-24009: Support for HiDPI displays

The regression is only observed on Windows-Mid-Range machine which is:
 CPU: 1x3.33GHz Core 2 Duo (E8600)
 MEM: 4 gb
 HDD: 250GB 7200rpm SATA HD
 GPU: Nvidia FX 570 

There is no regression on my Windows 7 T430 laptop (with Intel Graphics 400) as well as there
is no regression on Windows7-High-End machines which have AMD Radeon HD 6770.

JPA profile shows the time spent in d3d calls to run the same number of pulses has been increased almost in 2 times.

Note, the machine has latest Windows updates installed. 
So, the issue is perhaps NVidia specific.

Steps to run BitmapCanvas benchmark:
> cd JFX_WS/tests/performance/GUIMark2/
> ant
> java -cp "JFX_HOME/rt/lib/jfxrt.jar;./dist/GUIMark2.jar;../FXBenchmark/dist/FXBenchmark.jar;../../../import/benchmarks-2.1.1/benchmarks-2.1.1.jar"
       jrockit.bm.Main guimark2.bm.BitmapCanvasBenchmark -i 1 -wt 0 -tr 30 -monsters 18000 

Comments
The regression was caused by RT-28260 and the fix for that issue resolved this performance problem so I am closing this issue as a duplicate.
08-02-2013

The performance returned back in build 8.0-hgraphics-scrum-671. See Aurora results here: http://aurora.ru.oracle.com/performance/faces/ChessBoard.xhtml?reportName=FX2-graphics-scrum&parameters=%5BlatestBuild%5D11683%5BprevBuild%5D11594%5Bshownbenchmarks%5DGUIMark2.BitmapCanvas%5Bhwclass%5DWinXP-Mid-Range%5Brefrelease%5D8.0%5Brefbuild%5D11594%5Brefjdkrelease%5D%281%3D1%29%5Brelease%5D8.0%5Bbuild%5D11595%2C11671%5Bjdkrelease%5D%281%3D1%29&splitting=%5BX+axis%5DmetricName%5BComplement%5DfxRelease%2C+benchmark%2C+os%2C+jdkBuild%2C+jdk%5BY+axis%5DbenchmarkName%2C+benchmarkConf%2C+fxBuild%5BZ+axis%5Dhwclass%2C+benchmarkSuite%2C+fxConf%2C+jdkRelease&reference=%5BOthers%5DfxRelease%2C+fxBuild%2C+os%2C+jdkRelease%2C+jdkBuild%2C+jdk%2C+benchmarkSuite%2C+benchmarkName%2C+metricName%5BReference+Set%5Dbenchmark%2C+benchmarkConf%2C+fxConf%2C+hwclass&mixReference=false&flags=&significance=empty&hideDataConfiguration=false&calculateSummary=false&showSummaryExpanded=false&showSummaryContents=true&showComplementAttributes=false&compactTables=true&viewStyle=chessboard&filter=&filter_override=
08-02-2013

If the benchmarks revert in performance on the newest builds then we should close this bug out...
07-02-2013

I've just pushed a fix for RT-28260. The Screen.getScale() will always return 1.0 on MS Windows now.
07-02-2013

I've extended the test to include the following: for (com.sun.glass.ui.Screen s : com.sun.glass.ui.Screen.getScreens()) { System.out.println("Screen ("+s+").scale = "+s.getScale()); } and on my laptop I indeed get the scale factor of 1.(3) while it should be 1.0. This is a bug in Glass. I have filed a separate JIRA RT-28260 so that the performance regression could be tracked separately.
07-02-2013

Here is the output from CheckDPI on my Windows 7 laptop: Screen (javafx.stage.Screen@91b90611bounds:Rectangle2D [minX = 0.0, minY=0.0, maxX=1920.0, maxY=1080.0, width=1920.0, height=1080.0] visualBounds:Rectangle2D [minX = 0.0, minY=0.0, maxX=1920.0, maxY=1032.0,width=1920.0, height=1032.0] dpi:120.0).dpi = 120.0
07-02-2013

It looks like the glass implementation on Windows is determining the "pixel scaling" value from the screen DPI. Unfortunately, we interpret that value as "there are virtual pixels being used by the platform and they are scaled by this many real pixels" and so we increase the work we do behind the scenes by that amount. Unfortunately Windows does not implement any such "virtual pixels" and so all work is done at 1:1 even on screens with extremely high DPI. As such, the Glass screen objects should be returning a value of "1.0" indicating no such virtual pixel scaling is happening. I'm attaching a test case that prints out the DPI of all screens. If any of the screens are listed as 144 DPI or above on Windows then those screens will incur this extra "pixel doubling" work until we fix the Glass implementation. Please run this on the test machines and see what values of DPI they report. The DPI of the highest screen attached will be used to determine the scale factor to be used by the Canvas implementation.
07-02-2013

Jim, benchmarks-2.1.1.jar should be in JFX_WS/import/benchmarks-2.1.1/benchmarks-2.1.1.jar
06-02-2013

Note that following the steps in the description I get "Error: Could not find or load main class jrockit.bm.Main". Is there another jar needed on the command line?
06-02-2013

Remove Docs and assign to Jim.
29-01-2013

The Docs was there originally. I assume Ekaterina added it. I'll let her answer this question.
29-01-2013

You added Docs to the Components. Please provide more information on what should be fixed in documentation.
29-01-2013

Glass doesn't perform any rendering. Moving this issue from Glass to Graphics.
29-01-2013