I have a WCF web service method that is exposed using the WebHTTP binding. Whenever a client makes a first request, it takes about 10 seconds to get a response (e.g. when you invoke the service through Internet Explorer). Every subsequent request is less than a second. However, if you close the web browser and open a new web browser, the first request is again slow and all the other requests are instantaneous. The internal logs show the actual code in the method takes less than a second to execute. Thus I think this could be a communication/authentication overhead and not a JIT compile.but I could be wrong. There is no security necessary on the web service since it operates in a firewalled environment).
Would anyone know how to improve performance of this first request? Due to an SLA, I need to guarantee the response time is under 10 seconds.
Here is the cleansed configuration/code. The return type of the method is Stream because the legacy client needs to get the raw string response back without any XML headers or any other metadata.
public interface ISomeService
View Complete Post