STEPS TO REPRODUCE
1. Create a custom report which contains high chart widgets
2. Run the report with large data set
Expected Results: The report should be able to run quickly and provide output
Actual Results: The report at times becomes very slow and if the report contains large amount of data it can lead to out of memory errors in Jaspersoft logs too
Sample error when a large report with High Chart Widget is scheduled
2019-10-10 05:22:10,792 ERROR JobRunShell,quartzScheduler_Worker-1:222 [] - Job ReportJobs.job_11698804 threw an unhandled Exception:
java.lang.OutOfMemoryError: Java heap space
2019-10-10 05:25:14,152 ERROR ErrorLogger,quartzScheduler_Worker-1:2361 [] - Job (ReportJobs.job_11698804 threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.OutOfMemoryError: Java heap space]
at org.quartz.core.JobRunShell.run(JobRunShell.java:224)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
Caused by: java.lang.OutOfMemoryError: Java heap space
2019-10-10 06:00:59,875 ERROR JRFillSubreport,quartzScheduler_Worker-2:879 [] - Fill 1: exception
java.lang.OutOfMemoryError: Java heap space
This is due to the fact that high High charts are performance oriented and its recommended to use the HTML5 Charts. Also in Jaspersoft High charts are default rendered using the Rhino Engine and memory management of Rhino engine is not the best.
Release : 15.x
Component : CA PPM JASPERSOFT
Sample change from Windows
#Functions can be used to format html5 datalabels and tooltips
com.jaspersoft.jasperreports.highcharts.function.properties.allowed=true
com.jaspersoft.jasperreports.fusion.phantomjs.executable.path=C:\\App\\Jasper\\webapps\\reportservice\\phantomjs\\windows\\phantomjs.exe
com.jaspersoft.jasperreports.fusion.phantomjs.executable.timeout=600000
com.jaspersoft.jasperreports.highcharts.phantomjs.executable.path=C:\\App\\Jasper\\webapps\\reportservice\\phantomjs\\windows\\phantomjs.exe
Note: This is currently not as part of product by default and we are planning to add this when we upgrade Jaspersoft. This is tracked via DE51537 and currently this is not applied in Old SAAS environment but this is part of GCP and premise customers can apply this change and its supported.