title: Java JTable with frequent update?
body: <p>I'm coding a JTable that is capable of handling frequent updates.  Typically this JTable has ~1000 rows of data, and some of the columns will update frequently because their values are derived from stock price which moves a lot during market hours. </p>
  
  <p>The problem I'm facing is that when large # of rows (e.g. 80%) are updating, the JTable become very slow for 20-30 seconds or so, which the profiler shows that the EDT thread is extremely busy, handling tableChanged calls. </p>
  
  <p>I try to collapse the changes by 
  1) suppressing fireTableCellUpdated
  2) If there are &lt;= 50 rows changes, call fireTableRowUpdate on individual rows 
  3) If there > 50 rows of changes, calling fireTableDataChanged for the entire table. </p>
  
  <p>It's better, but still slow when there are frequent updates, my understanding is that fireTableDataChanged is slow as well.  So if data updates frequent enough, fireTableDataChanged will be called frequently, and the GUI will feel sluggish.  </p>
  
  <p>Can someone experienced in this subject recommend a best practice in using fireTableRowsUpdate, 
  fireTableDataChanged and fireTableStructureChanged to improve GUI liveliness and performance?  If you have pointers to sample codes that address this problem it'll be even better.</p>
  
  <p>Many thanks </p>
  
  <p>Anthony Si</p>