I have a .asmx web service webmethod that I am successfully calling from jquery.ajax. The webmethod is functioning properly. However, it performs very slowly.
The method itself does very little work right now. I have added CacheDuration = 120. That did not help. My real concern is how long it takes to actually call the method. When running the website local and starting VS2008 debugger with a breakpoint on the first line of the Webmethod, it takes nearly 5 seconds to even get to the first line. Then hitting continue in the debugger, the response happens immediately. So the webmethod does not seem to be the slow "thing".
Has anyone experienced similar behavior? Is there something I need to set for the webservice/method to be called faster?
Code:
[WebService(Namespace = "http://intranet/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
[System.Web.Script.Services.ScriptService]
public class DocumentService : System.Web.Services.WebService
{
[System.Web.Script.Services.ScriptMethod(ResponseFormat = ResponseFormat.Json)]
[System.Web.Services.WebMethod(EnableSession = true, CacheDuration = 120)]
public Tree[] GetDocumentTree(string root)
{........