Jump to content
We've recently updated our Privacy Statement, available here ×

Exporting to word document is taking long time 15 mins


mina p

Recommended Posts

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

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Hi

Is 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

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

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

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

  • 3 weeks later...
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

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