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

Slow Performance while using JasperReports in UNIX


malliboy

Recommended Posts

Hi All,

I'm trying to replace my project's reporting tool with JasperReports. Here are some quick details - Weblogic 8.1, Solaris, jdk 1.4.2.

Things are working. I can create reports in my environment. The problem is with the performance. I tried the same thing in Windows; it works like lightning. In UNIX, it is painfully slow.

I took the liberty to put SOPs in JasperReports library files and figured out where it is getting stuck. In JRFillElementContainer.prepareElements there is a call to JRFillElement.prepare().  Let me put down that piece of code for your reference.

***************

    tmpWillOverflow =
     element.prepareme(
      availableHeight + getElementFirstY(element),
      isOverflow
      )
     || tmpWillOverflow;

**************

I kept experimenting with JRFillElement.prepare... commenting out stuff etc. Finally I made another method with exactly the same signature and body (obviously a different name) and changed the calling method. And voila!! It worked just as fast as it did in Windows. From my analysis, it seems that the above is the only point in the whole report generation process which is taking time.

Does anyone have a clue? Because of this, what should take 15 seconds takes 10 minutes! A mere change in the function name seems to have done the trick!

Thanks,

Malliboy.

 

 

 

 



Post Edited by malliboy at 07/22/2009 06:51



Post Edited by malliboy at 07/22/2009 06:54
Link to comment
Share on other sites

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

I am also facing the same problem for Crosstab reports. On windows, filling and exporting takes less then 1 second but on Solaris these activities take 5 seconds.

Could please anyone suggest some optimization for Solaris machine?

Thanks,

Jinal

Link to comment
Share on other sites

I'd like to reopen my question. Let me rephrase the whole thing. Hope Jinal and I are talking about the same thing. :(

Hi All,

I\'m trying to replace my project\'s reporting tool with JasperReports. Here are some quick details - Weblogic 8.1, Solaris, jdk 1.4.2.

Things are working. I can create reports in my environment. The problem is with the performance. I tried the same thing in Windows; it works like lightning. In UNIX, it is painfully slow.

I took the liberty to put SOPs in JasperReports library files and figured out where it is getting stuck. In JRFillElementContainer.prepareElements there is a call to JRFillElement.prepare().  Let me put down that piece of code for your reference.

***************

    tmpWillOverflow =
     element.prepare(
      availableHeight + getElementFirstY(element),
      isOverflow
      )
     || tmpWillOverflow;

**************

I kept experimenting with JRFillElement.prepare. Commenting out stuff etc. I put an SOP just before the 'return false;' statement. I guess it is returning from the function pretty fast. But the statement I've pasted above is taking a LOT of time! :(

It runs fast in Windows and as standalone program in UNIX. The problem is when I bring in Weblogic into the picture. Any clue?

Thanks,

Malliboy.

Link to comment
Share on other sites

While filling the Crosstab report prepare(int availableStretchHeight, boolean isOverflow)  function of JRFillCrosstab.java is called for each element. This method takes more time on Solaris machine for Crosstab element.

I have Tomcat 5 running on Solaris machine wtih JDK 1.4.

 



Post Edited by jinal at 07/30/2009 13:08
Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

All I can say is that the JVM is slower on Solaris when it comes to dealing with graphics and font metrics and stuff like that.

But of course, particular conditions that are met on your machine might contribute as well, and investigating that remotely is impossible.

 

Thank you,

Teodor

 

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