Pivot
  1. Pivot
  2. PIVOT-103

Optimize LabelSkin#paint(Graphics2D)

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: wtk
    • Labels:
      None

      Description

      This paint method is called an order of magnitude more than any other. It's actually already pretty fast, but if there's one method to optimize the hell out of, it's this one.

        Issue Links

          Activity

          Todd Volkert created issue -
          Todd Volkert made changes -
          Field Original Value New Value
          Link This issue is depended upon by PIVOT-96 [ PIVOT-96 ]
          Hide
          Todd Volkert added a comment -

          Linking to PIVOT-96

          Show
          Todd Volkert added a comment - Linking to PIVOT-96
          Hide
          Noel Grandin added a comment -

          Had a quick look thru, and it looks pretty tight already.
          Don't see how you could speed it up much short of caching the output.
          You'd need to be careful to invalidate the cache when the parent background changed (because anti-aliasing will need to be redone).

          Swing caches the output of paint operations pretty extensively - double-buffering support is built in at JComponent level.
          They did it less for speed purposes than to limit tearing and grey rectangles on the display, but it probably gives a decent performance jump.

          Show
          Noel Grandin added a comment - Had a quick look thru, and it looks pretty tight already. Don't see how you could speed it up much short of caching the output. You'd need to be careful to invalidate the cache when the parent background changed (because anti-aliasing will need to be redone). Swing caches the output of paint operations pretty extensively - double-buffering support is built in at JComponent level. They did it less for speed purposes than to limit tearing and grey rectangles on the display, but it probably gives a decent performance jump.
          Todd Volkert made changes -
          Link This issue is depended upon by PIVOT-96 [ PIVOT-96 ]
          Todd Volkert made changes -
          Link This issue is related to PIVOT-96 [ PIVOT-96 ]
          Todd Volkert made changes -
          Fix Version/s 1.3 [ 12313779 ]
          Fix Version/s 1.2 [ 12313781 ]
          Greg Brown made changes -
          Fix Version/s 1.3.1 [ 12314034 ]
          Fix Version/s 1.3 [ 12313779 ]
          Greg Brown made changes -
          Assignee Greg Brown [ gbrown ]
          Greg Brown made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Greg Brown [ gbrown ]
          Fix Version/s 1.4 [ 12314166 ]
          Fix Version/s 1.4.1 [ 12314034 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Greg Brown
              Reporter:
              Todd Volkert
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development