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

PERF: Swing method "getValueAt" in the class AbstractTableModel is inefficient

XMLWordPrintable

    • generic, x86
    • generic, windows_2000

      Problem description Issue : I would like to discuss a low-level
      > bug/optimization opportunity involving the Swing method
      > "getValueAt" in the class AbstractTableModel, as used by JTable.
      > I am seeking a solution to a low-level rendering inefficiency
      > involving this code. In a nutshell, I have a situation where
      > getValueAt is being called needlessly, 1000's of times per second.
      > Many Java developers fight issues like this and it is a major
      > cause of performance problems involving data tables, leading many
      > people to complain about Java's slowness. I have already reduced
      > my getValueAt method to be a sinlge line of code:
      >
      > return tableModelData[row][col];
      >
      > I would like to discuss what else can be done, perhaps at lower
      > levels, to work around this performance problem.

      Related forum thread

      http://forum.java.sun.com/thread.jsp?forum=57&thread=443137

      "I've since learned that the repaint events are being
      triggered at least by JTable's valueChanged and
      columnSelectionChanged methods, where a rectangle for
      repainting is computed based on clicked cells.

            svioletsunw Scott Violet (Inactive)
            cprasadsunw Ck Prasad (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: