JasperSwapFileVirtulizer is taking huge time to generate PDF report

0

Hi

I am using jasper reports 3.7.1 jar to generate report (PDF/XLS/TXT/HTML). first for around 100,000 records tomcat was going out of memory so I implement JRSwapFileVirtualizer in my code.

Now I am able to generate report within 4-5 minutes. Now I have 250,000 records and for this JRSwapFileVirtualizer is not working.

I have written a stand alone class and I am testing it with JRCsvDataSource. When I run it swap file is created of size 150MB, I waited for around 1 hour but jasper code didnt generate PDF report So I terminate the thread. It is not showing any exception right now.

My code  is as below-

            JRSwapFile jrSwapFile=new JRSwapFile("C:\\Users\\TEST\\tempe",5000,100);        //5000, 100, 10 all these numbers are randomly taken.
            JRSwapFileVirtualizer swapFileVirtualizer=new JRSwapFileVirtualizer(10, jrSwapFile);
            customParameters.put(JRParameter.REPORT_VIRTUALIZER, swapFileVirtualizer);
            customParameters.put(JRParameter.IS_IGNORE_PAGINATION, false);

        JasperDesign jasperDesign = JRXmlLoader.load(ipPdfXmlLayout);                 //load jrxml file
        JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
        JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, customParameters, jasperDS);
        JasperExportManager.exportReportToPdfFile(jasperPrint, ipTxtFile.getPath()+".PDF");
        jasperDS.close();

mandarpatil.100's picture
Joined: Mar 21 2014 - 3:44am
Last seen: 5 years 1 month ago

0 Answers:

No answers yet
Feedback