Crosstab performance regression since JR v5.5.0


I noticed a significant decline in report performance for all our crosstab reports when moving from JasperReports v5.2.0 to anything newer.

Example: Dataset with about 42000 tuples for a crosstab with 1490 rows and 28 colums.  The data is pre-calculated in our application and stored in a JRBeanCollectionDataSource. The data is not pre-sorted according to the crosstab sort order, though.

With this dataset, JasperReports 5.2.0 takes about 219 seconds to create a CSV report (mean value, N=15, SD=13,37s).

With JasperReports 6.2.0, the reporting time with the same dataset is 285 seconds (mean value, N=15, SD=5,13s). This is more than 30% longer than with JR 5.2.0!

I tested all JR versions since 5.2.0 with this dataset and found that even with JR 5.5.0 (the direct released successor of v5.2.0) I see this regression.

When profiling the application with a smaller dataset (1798 tuples for a crosstab of 58 rows and 31 columns) I found that with JR 5.2.0 the hashCode() method of the tuple key objects get called 407566 times. With JR 5.5.0 and younger, the method gets called 3372250!

The difference seems to be in class net.sf.jasperreports.crosstabs.fill.calculation.BucketingService. The way the values are retrieved by BucketMapMap.get() differ significantly between v5.2.0 and younger versions.

In the v5.5.0 release notes (changes.txt) I found a comment mentioning interactive sorting introduced to the crosstab element, but I haven't found a hint on how to use it or get the original, more performant behaviour (our reports aren't interactive anyway, we produce CSV or PDF files usually)

Any idea what I might be doing wrong?

How can I improve crosstab performance with newer JasperReport versions?

Or should I report this as bug in the JR bug tracker?

Thank you!

ahaumer's picture
Joined: Apr 23 2009 - 12:38am
Last seen: 7 years 5 months ago

Please go ahead  and report it in the tracker.

elizam - 7 years 7 months ago

0 Answers:

No answers yet