This question is related to: ASMX Web Service slow first request.
I inherited a proxy to a legacy ASMX Service. Basically as the post above states, the first call performance is literally 10 times slower than the subsequent calls. I went ahead and turned on ‘Generate serialization assembly’ on the project that contains the proxy. The ‘serializers’ assembly is actually generated. However, I haven’t seen any performance increase at all. Do I need to do anything else other than make sure the ‘serializers’ assembly is in the client’s bin directory? Do I have to ‘link’ the proxy to the ‘serializers’ assembly during proxy generation (wsdl.exe)? I guess I’m stuck at this point. J Saunders where u at? 🙂
There is actually a lot more to start up time than just creating the serialisation assemblies. Creating the AppDomain, JITing all of the methods, parsing config files and so on can all take quite a bit of time.
You don’t actually say how much “10 times” actually is, but 10-15 seconds for the very first request is not unusual in my experience.
If you’re running Windows Server 2008, you can try Application Warm-Up which is basically just a tool that automatically makes requests for pages when the IIS worker process is recycled, or the server is rebooted and so on. But it’s not hard to write such a script yourself, really, as code4life says (Application Warm-Up has features which make it work a bit better than what you can do “manually”, but the manual way is still quite effective in my experience).