title: JTable - UI freezes upon many insertions
body: <p>I have a GUI app which has a couple of tabs, each of which hosts one <code>JTable</code>. My UI class i processing events coming from the Controller in the following piece of code, which runs on EDT:</p>
  
  <pre><code>private void processAnalysisResult(AnalysisResult generatedValue) {
      LimitType limit = generatedValue.getMetric().getLimit();
      String limitName = limit.getName();
      int index = tabs.indexOfTab(limitName);
      Component component = tabs.getComponentAt(index);
      JScrollPane scrollPane = (JScrollPane) component;
      JTable table = (JTable) scrollPane.getViewport().getView();
      AnalysisResultTableModel model = (AnalysisResultTableModel) table.getModel();
      model.addRow(generatedValue);
      }
  }
  </code></pre>
  
  <p>There are a couple of thousand newly generated results per second, atm I lowered it to about 10k. Even with that relatively low value the app freezes for about 10-20 secs processing the UI updates from Jtable. The <code>addRow</code> method calls <code>fireTableRowsInserted</code> mewthod upon insertion of each row, but can this be that slow?</p>
  
  <p>EDIT: This is the code that processes the event (asynchronously called from the background processing thread):</p>
  
  <pre><code>  controller.addAnalysisGenerationListener(new GeneratedValueListener&lt;AnalysisResult&gt;() {
          @Override
          public void valueGenerated(final GeneratedValueEvent&lt;AnalysisResult&gt; event) {
              processEDT(new Runnable() {
                  @Override
                  public void run() {
                      processAnalysisResult(event.getGeneratedValue());
                  }
              });
          }
      });
  
  
  private void processEDT(Runnable runnable) {
      if (EventQueue.isDispatchThread()) {
          runnable.run();
      } else {
          SwingUtilities.invokeLater(runnable);
      }
  }
  </code></pre>