Jump to content
Changes to the Jaspersoft community edition download ×

Virtualizer problem


nostro

Recommended Posts

Hi

 

I have an application with 42 reports. Each report is about 8000 pages. So I can't hold them in memory and tried to use the Virtualizer.

 

JRFileVirtualizer virtualizer = new JRFileVirtualizer(10, tempdir);

 

I found out that the JasperPrint-Object, that is displayed by the ReportViewer, is always of the same size, with or without virtualization.(about 60 MB)

 

Doesn't the JasperPrint-Object have to be much smaller? Only 10 pages should remain in memory, or not?

 

thanks a lot

 

Post edited by: nostro, at: 2007/03/06 15:03

Post edited by: nostro, at: 2007/03/06 15:04

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi

 

we have an SWT/JFace application so we use “com.jasperassistant.designer.viewer.ReportViewer†to integrate the reports in your application. The viewer gets the JasperPrint to display your reports.

 

Because we caused an OutOfMemory error after displaying 10 reports at the same time, I noticed that every report consume about 40 MB (Tested with Jconsole of jdk 5.0). Then I serialized the jasperPrint object to check the file size and it was also about 40 MB. I thought that if I used the Virtualizer only 10 pages would have been kept in memory so that the JasperPrint-Object is reduced in size. The rest is serialized in hundreds of files to the tmp directory and will be deserialized when required.

 

thanks a lot

Link to comment
Share on other sites

Hi

 

I fixed a bug in my own code, now the virtualizer improves the memory consumption problem, but there is still the problem, that the JasperPrint-Object is very big. You can see it in the attached screenshot of the JConsole (left with virtualizer, right without virtualizer).

 

 

 

Even with the virtualizer - specified to hold only 2 page in memory - it consumes about 38 MB. The serialized JasperObject is about 32 MB and after unsetting the JasperPrint-Object from the ReportViewer the memory consumption is again about 5 MB.

 

Without a virtualizer the JasperPrint-Object is a little bit smaller, about 30 MB. With and without using the virtualizer doesn’t draw a distinction. Ok, there is a memory advantage by using the virualizer ( of 74MB – 38MB = 36MB ), but I miss the advantage in respect of the JasperPrint -Object.

 

Could the 3 chart in the report cause that problem?

 

greetings

 

[file name=TestFiles.zip size=6869]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/TestFiles.zip[/file]

Post edited by: nostro, at: 2007/03/07 13:56

Link to comment
Share on other sites

The memory problem is indeed caused by the charts.

 

You have three time series charts with day as time period and there are 5000 days in the data source. This results in 3 charts, each having 5000 items.

 

Chart datasets are incremented in memory, so all the chart items are kept on the heap.

 

Is this what you really want? Do you think anyone would be able to make something out of a chart that displays 5000 items?

 

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