views:

17

answers:

2

Hello! I'm using JasperReporting engine, and i need to optimize reporting performance. Currently my application compiles reports from *.jrxml files every time, as I'm not changing the reports now and app is not able to generate user-defined reports I should compile them once and use .jasper files in future..... AM I RIGHT?? And do I need to re-compile them? Thanks in advance!

A: 

Let your application check both the .jrxml file and the .jasper file; if the later is missing or older than the .jrxml, recompile, otherwise just use the .jasper file.

ammoQ
Thanks! Actually I wanted to be sure that I'm doing right)
Andrew
if you are using a build tool like maven or ant it is possible to integrate this step in the build lifecycle. for maven there is an excelent plugin on codehaus
Salandur
A: 

You must not recompile your reports if you don't change them. Actually, there are two regular scenarios:

  • reports created by iReport - in that case compile them in iReport and use the compiled form
  • reports are generated on the fly, dynamically - in that case you'll need to compile them everytime. This is a much rarer case, though.
Bozho