Question

Nous allons avoir des problèmes de performance avec notre application où Crystal Reports (XI) est hébergé dans un WCF service. Avec une aide d'un profileur de performance, nous avons pu constater que l'appel à ReportDocument.Load prend plus de 10 secondes. Si nous creuser plus profond, le point le plus problématique est ReportClientDocumentClass.Open méthode qui prend l'ensemble de 10 secondes.

Nous appelons la méthode de charge comme ceci:

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

Le fichier de rapport est hébergé sur le même serveur que le service.

La "trace de la pile" pour un look de ReportDocument.Load comme ceci:

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

Et comme je l'ai mentionné ci-dessus, l'appel à ReportClientDocumentClass.Open est celui « suspendu ». Toutes les idées qui pourraient faire cela?

Était-ce utile?

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

Autres conseils

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top