Projects:Jasper Reports Cache/Specs
The goal of this project is to provide the ability of keeping the compiled Jasper Reports in cache, in order to improve the performance in the report generation by reusing the result of a report compilation in subsequent printings of that report.
State Before the Project
Currently the reporting engine is compiling every report before rendering it. If we were able to re-use the result of a report compilation each time it is generated, we would impact in a positive way to the performance of the report generation.
Cache Of Compiled Reports
A new class named CompiledReportManager will be created as the one in charge of generating and keeping the compiled reports in cache. Some considerations:
- It should be transparent to the reporting engine.
- It must take into account the language used to render the report, this is because compiling a translatable report in two different languages results into two different compiled reports.
- Those reports which are not generated using the standard reporting engine are not taking advantage of this feature.
- The cache will be disabled in case we are working with modules in in development status.
Centralize Is In Development Logic
As mentioned above, by default the cache will be disabled in case we are in development. The logic to find if there are modules in in development status is duplicated in several parts of the application:
For this reason, this logic will be centralized in the ADCS class providing a common API that can be used to know whether the application is in development status.
It will be provided a new MBean that will be accessible through JMX. It will allow to:
- See the contents of the Jasper Report cache.
- Clean the Jasper Report cache.