Jump to content
Changes to the Jaspersoft community edition download ×

How to reduce the cpu usage?


adferove

Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

You have probably already checked that it is not a problem with you JBOSS or the JDBC connection? Do you have many database request in the report or just a single select with a lot of output?

In an older version of the 'Ultimate Guide to JasperReports' by Teodor Danciu  I read that jasperreports by default creates the entire report in memory before printing it out.

The books describes a method called 'report virtualization'  that there is a way to proceed page by page, in a sort of streaming mode. I have not yet used this feature so I cannot tell any details. And my knowledge may be out of date.  There should be a working demo in the examples directory

Regards



Post Edited by ChristophLeser at 07/23/2009 17:35



Post Edited by ChristophLeser at 07/23/2009 17:44
Link to comment
Share on other sites

how long does it take the report to complete, and what responsetime toyou expect or require?

I did a quick test with a 20.000 rows / 4 columns report from an Oracle database, it took approximately 10 seconds running on aLenovo Think Pad R61. Would that be acceptible?

I added a barcode column to the test report. Now I see significant cpu consumption too ( 50% on my Intel Core Duo T8100 2.1Ghz with 2GB RAM while the report is filled ). But it seems to scale linearly with the number of rows:

100 rows 0.4 secs

1000 rows  3.5 secs

5000 rows 17.2 secs

10000 rows 35.0 secs

20000 rows 70.0 secs

So I think there is no special 'large report' cpu problem in this case. One might argue about the 0.003 secs per line.

Post Edited by ChristophLeser at 07/24/2009 09:05



Post Edited by ChristophLeser at 07/24/2009 10:19
Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

If you run a program, it will run.

That is, if you launch a report filling process, it will do what it has to do and would not stop unless you do something else on the system.

What I mean is: If you launch a report, and you then look at how your CPU is doing, of course it is running at 100%. What else should it be doing? Drink a coffee instead or pause a little from time to time?

If you don't want your report running routines to consume CPU when they have it at their disposal, then maybe you have to run those report filling programs on threads which have a lower priority or something like that.

 

I hope this helps.
Teodor

 



Post Edited by teodord at 08/14/2009 15:04
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...