mina p Posted October 11, 2013 Share Posted October 11, 2013 I have a jasper report that is taking long time to export to word document. During export if I do open or save it takes around 15 - 20 mins to export to word document. There are about 300 pages in jasper that needs to be exported to word. There is 5 columns and 6th column is a image that is being pulled from db. Each image is about 2 mb. There are not a lot of rows from db but because of iamge the size of the report is big. What can I do to make it faster as 15 mins is not acceptable. Is there a setting I can try to make it work. Link to comment Share on other sites More sharing options...
dipesh.bhavsar Posted October 11, 2013 Share Posted October 11, 2013 HiIs it possible for you to change the file format and save it in database.. like BMP and some other files are huge in size and in DB it is stored as bytes. when generating report again it needs to convert from bytes to image.try to save PNG/JPG files which have lesser size and generate report. may be it can help you. Link to comment Share on other sites More sharing options...
ajinkya_c Posted October 11, 2013 Share Posted October 11, 2013 Hi,Check with aspose plugin for jaspersoft to export reports in formate like word, pdf, rtf etc or used jpg/png files as dipesh suggested.Thanks,Ajinkya Link to comment Share on other sites More sharing options...
Teodor Danciu Posted October 11, 2013 Share Posted October 11, 2013 Hi, I would first try to understand why the export is taking so long, or whether most of the time is spent in filling the report, not exporting.Are you using the DOCX exporter of JR Library?Do you give enough memory to your application? In case you don't have sufficient memory, a lot of time is spent by the JVM garbage collecting things to free up space.What version of our products are you using? Thank you,Teodor Link to comment Share on other sites More sharing options...
mina p Posted October 12, 2013 Author Share Posted October 12, 2013 Thanks for your reply Teodor :)Initially, we were getting OOM ERROR. So now I am using file virtualizer to fill the report and then export the report. THe report is about 200 pages with each page having a different image. Basically, I have a word servlet that first fills the report using virtualizer and then prints it. This happens in one shot.JRFileVirtualizer virtualizer = new JRFileVirtualizer(2, "/tmp/");JasperPrint jasperPrint = JasperFillManager.fillReport(reportFileName, parameters, abc.getDataSource().getConnection());JRDocxExporter exporter = new JRDocxExporter(); exporter.exportReport();we are using version 5.2. what we saw was at time garbage collection hits around 98 percent and then application stops responding. how much memory you recommend. we had around 2300 mb allocated to the application and jasper reports with 768 perm space. Link to comment Share on other sites More sharing options...
mina p Posted October 12, 2013 Author Share Posted October 12, 2013 I mean we are using 5.1.2 jasper reports library Link to comment Share on other sites More sharing options...
mina p Posted October 13, 2013 Author Share Posted October 13, 2013 I asked my websphere administrator to do some analysis. He mentioned that two users when they ran report resulted in 700mb of session information. That is causing exhausting of heap space. Is that normal with jasper report? I can send you the heap analysis. There is net.sf.jasperreports.engine.base.JRBasePrintPage @ 0xae5621ce type of objects in the memory session. Teodor, can you explain why so much objects are being created in session memory? I am under pressure to get rid of jasper reports from the application so need help. I was told BIRT doesnt have memory issues liek this...We have over 2g of memory and 768mb perm gen space still having issues. i am enclosing the heap dumps after using file virtulizer has been enabled in image 6 and image 4 attached. As you can see there are big image objects in memory and memory objects are 5 times the original size of image . this looks weird why image would be inflated...need help please help...thanks Link to comment Share on other sites More sharing options...
lucianc Posted October 17, 2013 Share Posted October 17, 2013 The heap analysis shows that you are not using a virtualizer (you should have JRVirtualPrintPage instead of JRBasePrintPage). Recheck the code that creates and sets the virtualizer for the report. Link to comment Share on other sites More sharing options...
mina p Posted November 6, 2013 Author Share Posted November 6, 2013 I have enabled file virtulizer and took heap dumps after that. We are seeing image objects that is 5 times original size of image that is basically happening at filing time. this is causing server to crash...please see image 006 and image 004.png enclosed... 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