Jump to content
Changes to the Jaspersoft community edition download ×

virtualizer


bogleg20

Recommended Posts

Hi,

 

Can someone help me understand the virtualizer? I have a report that is potentially very large where I get OutOfMemory errors during the fill process. So I've taken the code from the VirtualizerApp demo like this:

 

JRFileVirtualizer virtualizer = new JRFileVirtualizer(2, "temp");

virtualizer.setReadOnly(true);

parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer);

report = JasperFillManager.fillReport( design, parameters, dataSource );

 

When I run my code, I see a bunch of serialized pages accumulate in my temp directory which I assume is good. The problem is however, is that the memory usage seems to remain the same. I still seem to run out of memory at approximately the same point. Am I missing something in the usage of the virtualizer?

 

Thanks

 

Chris

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

First of all, do virtualizer.setReadOnly(true) only after JasperFillManager.fillReport(..).

 

If you still have a memory issue, make sure first the memory is not consumed by something external to the fill process (e.g. a custom data source implementation) and then post more details about your report so that we can identify the cause.

 

HTH,

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