问题
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!
回答1:
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.
回答2:
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.
来源:https://stackoverflow.com/questions/3778947/when-do-i-need-to-re-compile-jasper-reports