Measuring & Tuning Ad Hoc Performance

If JasperReports Server is running slower than expected, then it is possible that a bottleneck exists in one of the server's ad hoc reports. In this case, JasperReports Server offers tools to measure and tune ad hoc performance.

To measure ad hoc performance:

  1. Log in to JasperReports Server as an administrator.

  2. Navigate to Manage > Ad Hoc Cache. There will be two columns that measure the performance of ad hoc reports.

    • Query (msec): The time between when the query was sent to the database and when the first row was received. If this time seems abnormally slow, better indexing may be required.

    • Fetch (msec): The time between when the first and last rows were received. If this time seems abnormally slow, then there may be a network bottleneck. This is true for any server architecture.

  3. Optional: If the Fetch column indicates a network bottleneck:

    1. Navigate to C:\ReportServer\ReportServer\apache-tomcat\webapps\jasperserver-pro\WEB-INF\classes.

    2.  Open the jasperreports.properties file. 

    3. Adjust the number of the net.sf.jasperreports.jdbc.fetch.size=n property as desired. Note that n represents the number of rows to fetch at one time.

To tune ad hoc performance:

  1. Log in to JasperReports Server as an administrator.
  2. Navigate to Manage > Ad Hoc Settings.
  3. Tune one or both of the following properties under Query Limits as needed:
    • Ad Hoc Dataset Row Limit: The maximum number of rows that an ad hoc report can return. Once the limit is reached, JRS truncates the report. Reducing the number of reported rows may improve performance, but reports may not accurately reflect the data set as a result.

    • Ad Hoc Filter List of Values Row Limit: The maximum number of items displayed in the Condition Editor when a user defines filters for a domain-based ad hoc report. Setting this to a lower value can improve performance.