Jump to content
We've recently updated our Privacy Statement, available here ×

Crosstab performance regression since JR v5.5.0


ahaumer

Recommended Posts

Hi!

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!

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...