malliboy Posted July 22, 2009 Share Posted July 22, 2009 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:51Post Edited by malliboy at 07/22/2009 06:54 Link to comment Share on other sites More sharing options...
malliboy Posted July 22, 2009 Author Share Posted July 22, 2009 Sorry folks. Ignore that. Totally! :) Link to comment Share on other sites More sharing options...
jinal Posted July 30, 2009 Share Posted July 30, 2009 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 More sharing options...
ChristophLeser Posted July 30, 2009 Share Posted July 30, 2009 Can you tell where the extra time is spent? Is it just startup of the JVM, is it compile/fill/export/print time? Is the problem only with the crosstab element? Link to comment Share on other sites More sharing options...
malliboy Posted July 30, 2009 Author Share Posted July 30, 2009 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 More sharing options...
malliboy Posted July 30, 2009 Author Share Posted July 30, 2009 Fill time - Answer to ChristophLeser's question. Post Edited by malliboy at 07/30/2009 12:16 Link to comment Share on other sites More sharing options...
jinal Posted July 30, 2009 Share Posted July 30, 2009 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 More sharing options...
ChristophLeser Posted July 30, 2009 Share Posted July 30, 2009 Malliboy states that the report runs ok on plain unix, the problem comming in when running with weblogics. Is a similar statement true in jinals case?Maybe it is just a problem with memory resources granted to the jasperreport when running insite weblogics/tomcat. Link to comment Share on other sites More sharing options...
jinal Posted July 31, 2009 Share Posted July 31, 2009 I am facing this problem while running it individually also. On Solaris machine more heap memory is given as compared to windows machine. Link to comment Share on other sites More sharing options...
teodord Posted August 14, 2009 Share Posted August 14, 2009 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 More sharing options...
malliboy Posted August 17, 2009 Author Share Posted August 17, 2009 Phew. I solved my problem. I was trying to run 2.0.4 code in 3.5.2. Silly me! And I never noticed it. :) Now it is running very fast! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now