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

℡╲_俬逩灬. 提交于 2019-12-12 02:21:29

问题


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


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/2276183/sql-server-reporting-services-web-references-vs-assembly-references-poor-perfo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!