Optimizing Performance of Memory-intensive Reports
During report generation, JasperReports compiles a report design definition (JRXML) file to a .jasper file, and then populates data in the .jasper file. The output of the report-filling process is a document in the form of JasperPrint object. Each instance of this object can be viewed, printed, or exported to formats, such as HTML, PDF, CSV, and XLSX.
A virtualizer is required during the creation of the JasperPrint object. When dealing with a large data set, the size of the object is likely to increase, leading to an increased memory consumption. To avoid triggering a Windchill out-of-memory exception, you need a virtualizer. The virtualizer splits the JasperPrint object into multiples files, and saves and compresses these files on the hard drive.
Windchill supports the following virtualizers:
JRFileVirtualizer: Creates temporary files on disk. It generates one temporary file per virtualized page.
JRSwapFileVirtualizer: Creates a single swap file in which all virtualized pages are stored. The file size can be extended, if required.
JRGzipVirtualizer: Default virtualizer. Does not create files to store virtualized pages. It optimizes memory consumption by compressing the JasperPrint object using Gzip algorithm.
The settings for the virtualizer are enabled through the following properties. The properties are configured in the jasper-integration.properties.xconf file located at WT_HOME/codebase.
com.ptc.wbr.jasper.virtualizer.enabled: Enables Jasper virtualizer support for Windchill. The default value is true.
com.ptc.wbr.jasper.virtualizer: Specifies the default virtualizer to use. The default value is JRGZIPVIRTUALIZER.
com.ptc.wbr.jasper.virtualizer.cachedsize: Specifies the number of pages of a JasperPrint object to be stored in memory. The default value is 300.
com.ptc.wbr.jasper.jrswapvirtualizer.blocksize: Specifies the number of blocks to be allocated by a swap file. The default value is 4096.
com.ptc.wbr.jasper.jrswapvirtualizer.mingrowcount: Specifies the minimum number of blocks by which the swap file can grow when full. The default value is 200.
com.ptc.wbr.jasper.virtualizer.templocation: Specifies the temporary location where the temporary virtualized files can be kept. The default value is {WT.TEMP}.
* 
PTC recommends not to change the default values.
Was this helpful?