Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-96

Java2D performance optimizations

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.1
    • 1.2
    • wtk
    • None

    Description

      The following are some performance numbers from a sample run on my local machine. They're only meaningful when compared against one another (they shouldn't ever be compared to someone else's numbers or against future performance runs). They show the relative run times of paint(Graphics2D) calls in our skin classes, sorted by avg run time.

      <pre>
      Skin :: calls :: avg (ms) :: total (ms)
      pivot.wtk.skin.terra.TerraMenuPopupSkin :: 73 :: 0.000000 :: 0
      pivot.wtk.skin.terra.TerraPanoramaSkin :: 430 :: 0.000000 :: 0
      pivot.wtk.skin.terra.TerraRollupSkin :: 2562 :: 0.000000 :: 0
      pivot.wtk.skin.terra.TerraSplitPaneSkin :: 471 :: 0.000000 :: 0
      pivot.wtk.skin.terra.TerraFlowPaneSkin :: 34167 :: 0.000088 :: 3
      pivot.wtk.skin.terra.TerraFormSkin :: 565 :: 0.001770 :: 1
      pivot.wtk.skin.terra.TerraSliderSkin :: 559 :: 0.001789 :: 1
      pivot.wtk.skin.terra.TerraMenuBarSkin :: 176 :: 0.011364 :: 2
      pivot.wtk.skin.terra.TerraSplitPaneSkin$SplitterSkin :: 433 :: 0.011547 :: 5
      pivot.wtk.skin.terra.TerraSeparatorSkin :: 165 :: 0.012121 :: 2
      pivot.wtk.skin.terra.TerraCalendarSkin :: 156 :: 0.019231 :: 3
      pivot.wtk.skin.terra.TerraScrollPaneCornerSkin :: 291 :: 0.020619 :: 6
      pivot.wtk.skin.terra.TerraTabPaneSkin :: 368 :: 0.021739 :: 8
      pivot.wtk.skin.terra.TerraTablePaneSkin :: 863 :: 0.040556 :: 35
      pivot.wtk.skin.terra.TerraAccordionSkin :: 92 :: 0.043478 :: 4
      pivot.wtk.skin.terra.TerraSpinnerSkin$SpinButtonSkin :: 1476 :: 0.052168 :: 77
      pivot.wtk.skin.terra.TerraScrollBarSkin$HandleSkin :: 678 :: 0.058997 :: 40
      pivot.wtk.skin.terra.TerraSpinnerSkin :: 744 :: 0.060484 :: 45
      pivot.wtk.skin.terra.TerraCalendarSkin$DateButtonSkin :: 5818 :: 0.061705 :: 359
      pivot.wtk.skin.terra.TerraLabelSkin :: 36104 :: 0.066696 :: 2408
      pivot.wtk.skin.terra.TerraTextInputSkin :: 222 :: 0.072072 :: 16
      pivot.wtk.skin.ImageViewSkin :: 6488 :: 0.074445 :: 483
      pivot.wtk.skin.terra.TerraMeterSkin :: 804 :: 0.085821 :: 69
      pivot.wtk.skin.terra.TerraAlertSkin :: 124 :: 0.088710 :: 11
      pivot.wtk.skin.terra.TerraSliderSkin$ThumbSkin :: 555 :: 0.095495 :: 53
      pivot.wtk.skin.terra.TerraExpanderSkin$ShadeButtonSkin :: 256 :: 0.097656 :: 25
      pivot.wtk.skin.terra.TerraRollupSkin$RollupButtonSkin :: 1818 :: 0.097910 :: 178
      pivot.wtk.skin.terra.TerraScrollBarSkin :: 834 :: 0.100719 :: 84
      pivot.wtk.skin.terra.TerraScrollBarSkin$ScrollButtonSkin :: 1415 :: 0.108127 :: 153
      pivot.wtk.skin.terra.TerraAccordionSkin$PanelHeaderSkin :: 263 :: 0.133080 :: 35
      pivot.wtk.skin.terra.TerraExpanderSkin :: 266 :: 0.146617 :: 39
      pivot.wtk.skin.terra.TerraCheckboxSkin :: 3210 :: 0.151713 :: 487
      pivot.wtk.skin.terra.TerraMenuButtonSkin :: 591 :: 0.155668 :: 92
      pivot.wtk.skin.terra.TerraPromptSkin :: 19 :: 0.157895 :: 3
      pivot.wtk.skin.terra.TerraSpinnerSkin$SpinnerContentSkin :: 735 :: 0.161905 :: 119
      pivot.wtk.skin.terra.TerraListButtonSkin :: 134 :: 0.164179 :: 22
      pivot.wtk.skin.terra.TerraMenuBarItemSkin :: 664 :: 0.183735 :: 122
      pivot.wtk.skin.terra.TerraMenuSkin :: 69 :: 0.202899 :: 14
      pivot.wtk.skin.terra.TerraMenuItemSkin :: 238 :: 0.210084 :: 50
      pivot.wtk.skin.terra.TerraTabPaneSkin$TabButtonSkin :: 1041 :: 0.282421 :: 294
      pivot.wtk.skin.terra.TerraCalendarButtonSkin :: 340 :: 0.285294 :: 97
      pivot.wtk.skin.TextAreaSkin :: 71 :: 0.323944 :: 23
      pivot.wtk.skin.terra.TerraFrameSkin$FrameButtonSkin :: 122 :: 0.336066 :: 41
      pivot.wtk.skin.terra.TerraTableViewHeaderSkin :: 413 :: 0.341404 :: 141
      pivot.wtk.skin.terra.TerraBorderSkin :: 6200 :: 0.358226 :: 2221
      pivot.wtk.skin.terra.TerraPushButtonSkin :: 1300 :: 0.363846 :: 473
      pivot.wtk.skin.terra.TerraLinkButtonSkin :: 399 :: 0.385965 :: 154
      pivot.wtk.skin.terra.TerraScrollPaneSkin :: 1968 :: 0.462398 :: 910
      pivot.wtk.skin.terra.TerraRadioButtonSkin :: 565 :: 0.467257 :: 264
      pivot.wtk.skin.terra.TerraTreeViewSkin :: 427 :: 1.060890 :: 453
      pivot.wtk.skin.WindowSkin :: 802 :: 1.168329 :: 937
      pivot.wtk.skin.DisplaySkin :: 797 :: 1.193225 :: 951
      pivot.wtk.skin.terra.TerraListViewSkin :: 194 :: 1.324742 :: 257
      pivot.wtk.skin.terra.TerraTableViewSkin :: 465 :: 1.408602 :: 655
      </pre>

      There are a few things that jump off the page to me:

      1) LabelSkin is called to paint a TON! This is because it's used in virtually every renderer. Its average run time is comparatively fast, but because it's so foundational, it's the one paint method that should be optimized to the tilt.

      2) BorderSkin's paint is way costlier than you'd think it'd be relative to other skins (it's in the 80th percentile), and it's also called an awful lot. Can we find out what's taking so long and speed it up?

      3) DisplaySkin and WindowSkin only fill in their background color, yet because they often do it on the entire clip rect (display always does, window always does when it's maximized), it's surprisingly expensive! ScrollPaneSkin has the same issue but to a lesser extent. Is there any known trick to speeding up this primitive graphics operation? I doubt it, but it's worth asking

      Attachments

        1. diff.txt
          5 kB
          Todd Volkert

        Issue Links

          Activity

            People

              tvolkert Todd Volkert
              tvolkert Todd Volkert
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: