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

Request improved dirty region tracking in javax.swing.RepaintManager

XMLWordPrintable



      Name: krT82822 Date: 03/03/2000


      (3 Mar 2000, eval1127@eng -- see also 4305614)

      java version "1.3beta"
      java(TM) 2 Runtime Environment, Standard Edition (build 1.3beta-0)
      Java(TM) Hotspot Client VM (build 1.3beta-0, mixed mode)


      Current RepaintManager policy for combining dirty regions within a single
      component by simply taking the union of the rectangles can be very inefficient
      in some cases.
      In particular if the component is a JTable containing 50 rows and 40 columns and
      the cause of dirty region is because the value in a cell has been updated.
      Then for example if the cell 0,0 is updated and also the cell 49,39 is updated
      at the same time then a requests to paint the rectangle covering cell 0,0 and a
      seperate request to paint the rectangle covering cell 49,39 are generated and
      combined by the RepaintManager into a dirty region which covers the entire
      table!
      Thus when the JTable receives the paintImmediately() call, it must repaint all
      2000 cells instead of only the 2 cells which actually require it.

      In a way this is a general performance issue, if I could repaint the whole 2000
      cell Jtable in a small fraction of a second I could afford to ignore the
      inefficiency of the RepaintManager algorithm.
      However with columns set to 30 pixels wide (default 16 pixel height) under
      Windows NT on a Compaq Deskpro EP series 6400 Pentium II 400Mhz it takes about
      1.7 seconds for a single repaint of the whole 2000 cell JTable.
      (Review ID: 99811)
      ======================================================================

            kaddepalli Krishna Addepalli
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: