Print Page | Close Window

ReportClientDocumentClass.Open() very slow

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=11406
Printed Date: 21 Apr 2025 at 5:12am


Topic: ReportClientDocumentClass.Open() very slow
Posted By: owingruters
Subject: ReportClientDocumentClass.Open() very slow
Date Posted: 13 Oct 2010 at 2:58am
Hi,

I have created some reports that run fine on both development and testing machines. When I deploy to the customer the reports are loaded terribly slow (60 seconds)where they are faily fast on the test environment (5 secs). I have profiled the call using ANTS profiled and found that 70% of the time is taken by the ReportClientDocumentClass.Open().

Since I have no influence on this method I wonder if there is anything else I can to to make it faster or analyze why it is slow. I have already tried setting <generatePublisherEvidence enabled="false"/> but no effect

Any ideas will be welcome

Owin



Replies:
Posted By: hilfy
Date Posted: 22 Oct 2010 at 5:42am
Since you're using ReportClientDocumentClass, is it correct to assume that you're connecting to either Crystal Reports Server or BusinessObjects?  This is a class that requires a connection to a Report Application Server (RAS) so I think this is a safe assumption.
 
When you open a report using ReportClientDocumentClass, it connects to the local RAS.  I suspect the issue is dut to the speed of communication between your application and this server.  So you need to look at where your application is running vs. where the RAS is running on the network.  If there's a firewall between them, the RAS needs to be set to run on a specifed port, that port needs to be open in the firewall, and you need to communicate with it over that port.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: owingruters
Date Posted: 22 Oct 2010 at 10:15pm
Hi Hilfy,

Thanx for the reply.
Your assumption that we are using CR server or BO is incorrect.

To tell you someting about the background:
We have migrated a application that contains about 60 reports from a VB application and CR 6 to a .Net application using CR for Visual Studio 2008. All we had to do to migrate the reports was to open them in CR 2008 and save them.

Now, some of these reports perform better that the old way, while others are much slower (70 seconds against 1) every time and others are only slow the first time and fast the second time.
We are only opening the reports from .Net, filling them with data and showing them to the user.

So no CR server, nor BO is being used. Judging your answer we are using an entire wrong way of opening the reports.

Does this clarify things for you?

Thanx and I hope you can help some more.

Owin


Posted By: hilfy
Date Posted: 23 Oct 2010 at 3:39pm
So why are you using ReportClientDocument instead of ReportDocument?
 
ALso, the first time that an application loads reports, it also has to load all of the Crystal assemblies into memory - this takes a while and may explain some of what you're seeing, especially if you are seeing things open faster the second time they're loaded.  Does you application display multiple reports?  Do you notice that the first report that you open takes longer but any other reports, even if they're not the same .rpt don't?
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: owingruters
Date Posted: 25 Oct 2010 at 12:37am
I have done some checking and it turns out that I am not calling ReportClientDocumentClass.Open(). CR is doing that. I am calling _myReport.Load(). All that is done afterwards is done by CR and not in our code.

I did not see the difference between our code and CR code when I did the performance profiling. I do have a nice image of the profiling. Can I send it to you somehow? Maybe then, you'll have a better look on what is actually happening

Owin


Posted By: owingruters
Date Posted: 31 Oct 2010 at 10:07pm
Hilfy,

Can you still help me on this?


Posted By: hilfy
Date Posted: 01 Nov 2010 at 4:18am
I'm not sure what more I can do.  The things that slow things down when you call .Load are:
 
1.  Loading the Crystal .NET assemblies (yes, there's more than one!) into memory if they aren't there already.
 
2.  Loading any data that is saved with the report into memory - best practice is to turn off "Save Data with Report".
 
3.  Loading any images that may be included in the report.  If you have any "standard" images that aren't coming from data, make sure they're in the smallest possible format.
 
Also, Crystal can be very memory intensive and tends to do a lot of swapping to its own temp files on disk.  So, lack of memory and a fragmented drive or slow disk access will slow things down as well.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window