Ask a questionAsk a question
 

AnswerSlow start when calling web service

  • Thursday, November 05, 2009 2:28 PMChristian Sparre Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi

    I know this might not be the exact forum to ask this question, but I will give it a try anyway.

    I access a Web Service using SOAP, mapped with wsdl.exe and all.

    The first call, no matter what method, is very slow. About 8 seconds. All subsequent calls come through blazingly fast :)

    Any idea what is causing this?

    The service I'm requesting is the Amazon S3 SOAP interface. But again it does not matter what methods I call, it's only the first request that is slow.

    If I create a new instance of the same service class and call the same methods on the two, again ONLY the first called method is slow, the second method call even if its on the new instance is just as fast as all the others.

    Hope you can help.

    --
    Christian

Answers

All Replies

  • Thursday, November 05, 2009 4:13 PMChristian Sparre Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi again

    So I just came home and got the latest source and tried it on my home dev machine. And BINGO here it just runs perfectly... fast and everything?

    I read something about proxy settings having an impact? Can someone explain?

    --
    Christian
  • Thursday, November 05, 2009 4:37 PMAmadeo Casas - MSFTModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    This seems like an issue in your machine. It can be related to the proxy settings or to something else. It would require more data/information from you and more investigation. But I am glad it works fine for you now.
  • Thursday, November 05, 2009 4:38 PMBalaji Baskar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    the reason depends on analyzing the network connection or network tracing. However there is a post which has a reference to this topic, please see: http://social.msdn.microsoft.com/forums/en-US/asmxandxml/thread/6486cf6c-1553-4ca5-8c03-98137cfd338f

    However, The first time you call the webservice, or the first time after a long delay, the web service needs to start up. This is where you're seeing the delay. After that, it's already started and will respond really quickly to calls. This is standard web service behaviour.

    Since you are consuming services offered from Amazon, there is a developer discussion forum which discusses about this, http://developer.amazonwebservices.com/connect/message.jspa?messageID=120294

    hope this helps...


    Balaji Baskar [Please mark the post as answer if it answers your question]
  • Thursday, November 05, 2009 5:18 PMChristian Sparre Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi

    Thank you both for your replies. The one about dynamic compiling and that beeing the reason is far fetched I think, as the PC where it works fast is only a dual core (much slower than my workstation at work)

    I'm leaning towards the proxy reason, I will have a chat with one of our technicians tomorrow about our setup.

    Again thank you both.

    --
    Christian