Question

We're having some performance problems with our app where Crystal Reports (XI) is hosted in a WCF-service. With a help of a performance profiler we were able to find out that the call to ReportDocument.Load is taking over 10 seconds. If we dig deeper, the most problematic point is in ReportClientDocumentClass.Open-method, which is taking the whole 10 seconds.

We're calling the Load-method like this:

dim doc As ReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument
doc.Load("filename")

The report file is hosted on the same server than the service.

The "stack trace" for ReportDocument.Load looks like this:

ReportDocument.Load
ReportClientDocumentWrapper.EnsureDocumentIsOpened
ReportClientDocumentWrapper.Open
ReportClientDocumentClass.Open

And like I mentioned above, the call to ReportClientDocumentClass.Open is the one "hanging". Any ideas which could cause this?

Was it helpful?

Solution

The original problem was pinpointed to the printers. The call to Open-method tries to connect to the printer which was used when the report was designed. When the report was deployed, the printer wasn't available anymore but it took Crystal around 15 seconds to notice that.

Opening the report and setting it to use no printer fixed this particular performance problem.

OTHER TIPS

I have noticed on a WCF service I am profiling that the Client > WCF > Service call has the following performance characteristics:

  1. first call to the service by a new instance of the client:
    1. after not running the client for 1-2 minutes: ~12-15 seconds;
    2. after closing a previous instance of the client: ~1.1 seconds;
    3. after restarting Windows: ~21 seconds;
  2. subsequent calls to the service by an existing instance of the client: ~0.1 seconds

running Windows 2003 Server SP2 with 512 MB RAM.

I am not sure what within WCF is triggering this performance variation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top