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

How to reduce the jasper report filling time?


anila

Recommended Posts

When huge data is to be filled into the jasper report, its taking much time for the report generation.

(It took 19mins to generate one of my report.)

Please help me with a solution where i can optimize this filling process of the jasper report, so that reports can be generated quickly? 

Please provide with any source code if available.

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

Me too! I have the same problem. When I execute a sql Command, it goes really fast, but by filling report it takes 2 minutes... it's too long to wait...

Anyone know what's the problem?

Windows Xp Professional, Version 2002, service pack 2 Intel Pentium® 4 CPU 2.00GHz, 512 MB RAM

Link to comment
Share on other sites

Hi,

 

I cannot comment on performance unless you tell me how long is the resulting report and how much content is on each page.

 

The memory of the PC is not relevant, but rather the memory you allow the JVM to use by setting the -Xmx arguments on JVM startup. Can you tell me if you set those? To what values?

 

As a side note, a 512MB RAM windows PC is hardly enough for browsing the web these days. If you have critical applications requiring better performance, increasing the RAM on the computer is the next best thing you could do.

 

I hope this helps.

Teodor

 

Link to comment
Share on other sites

Hi,

 

If you have only one page for 50K rows, it probably means you use a setting for ignoring pagination.

If you ignore pagination, the number of pages (one) is irrelevant. However, the 50K rows indicate it is a large report.

 

If you do not set those arguments to the JVM, it means it uses the default memory size which is 64M.

With so few memory to use, the JVM spends a lot of time garbage collecting things so that it frees some memory up during report execution. Try increase the memory used by the JVM, as advised, and see how it goes.

 

I hope this helps.
Teodor

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for your suggestions.

Though i increased the JVM size i couldn't find any significant decrease in report generation time.

Can any of you help me with a solution at jasper level wherein i can reduce the report filling time(when the "fillReport" method is called).

Is there any way or workaround to have control on the "fillReport" method when huge data is present, so that we can reduce the report filling time?

Please provide a solution (if you have any)  as soon as possible.

Thanks in anticipation.

 

Link to comment
Share on other sites

Hello Anila...

Do you have read this?

teodord
Wrote:

Hi,

 

I cannot comment on performance unless you tell me how long is the resulting report and how much content is on each page.

 

The memory of the PC is not relevant, but rather the memory you allow the JVM to use by setting the -Xmx arguments on JVM startup. Can you tell me if you set those? To what values?

 

As a side note, a 512MB RAM windows PC is hardly enough for browsing the web these days. If you have critical applications requiring better performance, increasing the RAM on the computer is the next best thing you could do.

 

I hope this helps.

Teodor

 

Link to comment
Share on other sites

  • 3 years later...
  • 10 years later...

i am also facing the performance issue:
   Trying to generate excel report by using dynamic jasper (6.10  version ). There are total 90k records and fillreport() method taking approx. 2 minutes .
can you please suggest any change that i need to look into it.

    params.putAll(jd.getParametersWithValues());
        DefaultJasperReportsContext context = DefaultJasperReportsContext.getInstance();
        JRPropertiesUtil.getInstance(context).setProperty("net.sf.jasperreports.xpath.executer.factory",
            "net.sf.jasperreports.engine.util.xml.JaxenXPathExecuterFactory");
        jp = JasperFillManager.fillReport(jr, params);

Link to comment
Share on other sites

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.
 

Link to comment
Share on other sites

Performance issues depend on many factors (resources such as ram and CPUs, JVM params, errors, memory leak, tuning....).You would need to fine-tune your environment to lower the response time. 

The best way to go through this is first to check your logs. Are there any errors? If you can, try increasing the RAM; the larger the size of your files, the more memory you will need. Common performance issues mostly come from not having enough memory allocated to your report engine or misconfigured.


Also, please use the latest JRS versions (which are generally better in performance than the previous ones), and use the latest JDK version with the parameters recommended in our install guide. 

You can go further on the investigation by hooking your JRS with visualVM or another profiling tool and check how much memory your report takes and in which java method it's taking the most of the time, sometimes a bad implementation of report components can impact the memory consumptions, especially for crosstabs. 

Please see here for how to investigate performance issues and fine-tuning : 

https://community.jaspersoft.com/wiki/tibco-jasperreports-server-performance-tips-and-tricks
https://community.jaspersoft.com/wiki/virtualizers-jasperreports
https://community.jaspersoft.com/wiki/using-visual-vm-jasperreports-server-view-call-traces
https://community.jaspersoft.com/wiki/changing-garbage-collection-g1-tibco-jasperreports-server
https://community.jaspersoft.com/wiki/sun-openjdk-jvm-garbage-collection-tuning

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