开发者

SQL Server Reporting Services: web references vs assembly references, poor performance

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 m开发者_运维百科y 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


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.


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. :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜