bogleg20 Posted January 31, 2007 Share Posted January 31, 2007 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 More sharing options...
lucianc Posted January 31, 2007 Share Posted January 31, 2007 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 More sharing options...
bogleg20 Posted February 1, 2007 Author Share Posted February 1, 2007 Moving the setReadOnly(true) after the fill seems to have done the trick. Thanks Lucian! You saved me from myself. =) Chris Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now