title: JasperReports fillReport too slow and resource consuming
body: <p>I've found that JasperReports is really <strong>slow</strong> when filling a report from a Java app. The program hangs at this line:</p>
  
  <pre><code>print = JasperFillManager.fillReport(report, parameters, xmlDataSource);
  </code></pre>
  
  <p>It usually stays there for <strong>3 minutes, consuming up to 300Mb of RAM and 50% CPU</strong>.</p>
  
  <ul>
  <li><code>report</code> is a compiled (.jasper) report that uses 3 subreports.</li>
  <li>The datasource is a pretty big XML file (about 100k lines, 1.5Mb)</li>
  <li>The machine is a 3Ghz dual core with 4Gb of RAM</li>
  </ul>
  
  <p>So, how can I improve report filling performance?</p>