Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8117571

8.0-controls-scrum-849: up to 40% performance regression in Controls.ListView and Controls.TreeView benchmarks

XMLWordPrintable

      There are following performance regressions in build 8.0-controls-scrum-849:
       Controls.ListView-Keyboard: -27% (-58.98 fps)
       Controls.TreeView-Keyboard: -38% (-44.28 fps)


      The regressions are caused by fix for "RT-25059: ListView scroll bar thumb resizes wildly" which changed
      diff -r dbcbfaf3abb4 -r d61aca2e2f9b modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java
      --- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java Wed Sep 25 10:01:43 2013 +1200
      +++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java Wed Sep 25 12:05:27 2013 +1200
      @@ -1467,7 +1467,9 @@
                       // only a single row and it is bigger than the viewport
                       lengthBar.setVisibleAmount(flowLength / sumCellLength);
                   } else {
      - lengthBar.setVisibleAmount(numCellsVisibleOnScreen / (float) cellCount);
      + // Changed the calculation here due to RT-25059. This new approach
      + // ensures the thumb does not resize unexpectedly.
      + lengthBar.setVisibleAmount(cellCount / viewportLength);
                   }


      As result lengthBar.setVisibleAmount is now called with 20.0803 instead of 0.0021 in case of running
      Controls.ListView-Keyboard benchmark. As result the time spent in com.sun.javafx.scene.control.skin.VirtualFlow.show
      has been increased which dropped the performance. Here are JPA data for 848 and 849 builds:

      848
      ===
      10.398 com.sun.javafx.scene.control.skin.ListViewSkin.onSelectPreviousCell()
      2.348 com.sun.javafx.scene.control.skin.ListViewSkin.onSelectNextCell()
      --------------------------------
      0.036 com.sun.javafx.scene.control.skin.VirtualFlow.show(int)
      --------------------------------
      11.779 com.sun.javafx.scene.control.skin.VirtualFlow.show(javafx.scene.control.IndexedCell)
      0.387 com.sun.javafx.scene.control.skin.VirtualFlow.resizeCellSize(javafx.scene.control.IndexedCell)
      0.287 com.sun.javafx.scene.control.skin.VirtualFlow.setCellIndex(javafx.scene.control.IndexedCell, int)
      0.165 com.sun.javafx.scene.control.skin.VirtualFlow.getCellBreadth(javafx.scene.control.Cell)
      0.025 com.sun.javafx.scene.control.skin.VirtualFlow.getVisibleCell(int)
      0.025 javafx.scene.Node.setVisible(boolean)
      0.015 com.sun.javafx.scene.control.skin.VirtualFlow.positionCell(javafx.scene.control.IndexedCell, double)
      0.013 com.sun.javafx.scene.control.skin.VirtualFlow.adjustPositionToIndex(int)
      0.006 com.sun.javafx.scene.control.skin.VirtualFlow.getAvailableCell(int)
      0.005 com.sun.javafx.scene.control.skin.VirtualFlow.getCellLength(javafx.scene.control.IndexedCell)
      0.002 com.sun.javafx.scene.control.skin.VirtualFlow.requestLayout()
      0.001 java.lang.Math.max(double, double)
      0.001 com.sun.javafx.scene.control.skin.VirtualFlow$ArrayLinkedList.addLast(java.lang.Object)

      848
      ===
      9.280 com.sun.javafx.scene.control.skin.ListViewSkin.onSelectNextCell()
      7.064 com.sun.javafx.scene.control.skin.ListViewSkin.onSelectPreviousCell()
      --------------------------------
      0.073 com.sun.javafx.scene.control.skin.VirtualFlow.show(int)
      --------------------------------
      10.819 com.sun.javafx.scene.control.skin.VirtualFlow.show(javafx.scene.control.IndexedCell)
      2.390 com.sun.javafx.scene.control.skin.VirtualFlow.resizeCellSize(javafx.scene.control.IndexedCell)
      1.744 com.sun.javafx.scene.control.skin.VirtualFlow.setCellIndex(javafx.scene.control.IndexedCell, int)
      1.089 com.sun.javafx.scene.control.skin.VirtualFlow.getCellBreadth(javafx.scene.control.Cell)
      0.089 com.sun.javafx.scene.control.skin.VirtualFlow.positionCell(javafx.scene.control.IndexedCell, double)
      0.053 com.sun.javafx.scene.control.skin.VirtualFlow.getAvailableCell(int)
      0.050 com.sun.javafx.scene.control.skin.VirtualFlow.getVisibleCell(int)
      0.012 com.sun.javafx.scene.control.skin.VirtualFlow$ArrayLinkedList.addLast(java.lang.Object)
      0.012 javafx.scene.Node.setVisible(boolean)
      0.006 com.sun.javafx.scene.control.skin.VirtualFlow.getCellLength(javafx.scene.control.IndexedCell)
      0.004 com.sun.javafx.scene.control.skin.VirtualFlow.getCellPosition(javafx.scene.control.IndexedCell)
      0.001 com.sun.javafx.scene.control.skin.VirtualFlow.setMaxPrefBreadth(double)


      Steps to run Controls.ListView-Keyboard:
      > cd JFX_WS/tests/performance/Controls/
       > ant
       > java-Djavafx.animation.fullspeed=true
             -cp "JFX_HOME/rt/lib/jfxrt.jar;./dist/Controls.jar;../FXBenchmark/dist/FXBenchmark.jar;../../../import/benchmarks-2.1.1/benchmarks-2.1.1.jar"
             jrockit.bm.Main controls.bm.ListViewBenchmark -i 1 -wt 0 -tr 60 -mode keyboard -keysPerInjection 100 -cells 10000

            jgiles Jonathan Giles
            epavlova Ekaterina Pavlova
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: