Jump to content

Impact of SortField in huge reports


raffimd

Recommended Posts

Hi,

I have implemented JasperReports with JRDataSource and virtualizer for few huge reports. It takes almost 2 hours right now.

I cannot get the sorted data from the service layer in a report and I would like to use the <SortField> element of the JasperReports. Will that have much impact on the report performance?

 

How does the SortField work with virualizer?

Does it Sort the items evertime it receives a row/record or at the end of the report data?

Any idea about the impact of this on the performance of the report?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

raffimd wrote:

How does the SortField work with virualizer?

 

Virtualization only deals with generated report pages, hence it does not affect in any way the sort field functionality.

 

Does it Sort the items evertime it receives a row/record or at the end of the report data?

 

If you have any sort fields in your report, the entire data will be fetched from your data source into memory and sorted using the standard java.util.Collections.sort() method. This happens before the report rendering starts.

 

The most significant impact in the case of large data sets is the impact on memory.

 

Regards,

Lucian

Link to comment
Share on other sites

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...