views:

330

answers:

2

I am using Reporting Services to render a report directly to PDF. It requires that I use two web references: ReportExecution2005.asmx and ReportService2005.asmx. The performance on web references seems really poor. Since my web server (IIS7) and my SQL Server (2008) are on the same box, is there a way I can reference them directly? If not is there any way I can explicitly cache them or something. First load is really really slow, second load is perfectly acceptable.

Thanks

A: 

HTTP is a relatively expensive protocol--you are taking all that html data and then re-encoding it as plain text then pushing it down the wire and decoding it. Adding a big old XML service layer on top in this case.

Another issue is with your setup--if you are doing development work and restarting the server frequently, performance is going to suffer as you are kickstarting and recompiling on most requests which are very expensive operations. I'd do some performance tests on a more end-to-end system and see if that performs well enough.

Just re-read your question. If you have first load issues, check the app pool settings and make it never recycle. I'm guessing your reporting service isn't hit that often, so the process gets shut down and needs to spin up when called.

Wyatt Barnett
Thanks for the answer, but the perfomance is poor in production as well as development.
Praesagus
See the edit . . .
Wyatt Barnett
I looked at the app pool in iis and it recycles every ~29 mins. The first report load is 45 seconds or so. AFter that it's less than a second for loads following. The app pool needs to recycle to keep errors to a minimum right? (like rebooting your computer). Any suggestions how to solve this? Is there any way to load these references when the pool loads or better, reference them directly? I really dont know much about this at all so I would be grateful for any details.
Praesagus
Nope, app pool need not recycle with any frequency unless there are problems. Generally, those problems come from unmanaged apps sharing app pools, not native .NET stuff.
Wyatt Barnett
A: 

Two things need to be done to solve this issue:

  1. xml serialization
  2. Change the Reporting service recycle time (worth about 20 seconds on first report startup for me)
  3. Change the application pool recycle time in IIS (worth about 5 seconds on first report startup for me)

As a side note on the xml serialization there are instances where the setting above does not actually add anything to your assembly. You can add web proxy classes by opening a commandline in your project dir and enter wsdl <web service name> /out<proxy class name> e.g. wsdl http://myworkstn:8080/ReportServer_SQLEXPRESS/ReportExecution2005.asmx /out: ReportExecutionProxy.cs.

Then add a post build event (Solution Explorer | Rt Click on Project | Properties | Build Events (Tab) | Post –build event command line (section)) "$(FrameworkSDKDir)Bin\sgen.exe" /force /assembly:"$(TargetPath)" /proxytypes /parsableerrors The /proxytypes switch only adds the proxy classes

Hope this saves you the hours it took me to find all this. :)

Praesagus