1st invocation of Web Service from client is very slow - solution?



Hi everyone,

We have run into above problem recently. All I found so far are other
people complaining that 1st invocation of a Web Service can be very
slow, the problem size (delay) seems to depend on number of methods
(maybe even exponentially) and no one knows of a solution (other then
writing the client proxy yourself). Note I am talking about the client
side (similar problem occurs on server side but is less severe since
the server should in principle be up all the time, so paying the
penalty once it tolerable). Some references I saw are below.

As I understand the problem is has to do with dynamic code creation
and compilation on the client during construction of the proxy, in
order to enable Soap serialization. Will this be avoided if I used
remoting (maybe with Binary formatter?)? Alternatively with .Net Web
Services can I provide an interface or otherwise "guarantee" that the
remote methods do not change signature, and get the proxy to compile
once statically like "normal" function calls (I guess it should also
be written to and read from disk instead of a memory cache)? I.e. I
would like to compile once in design time vs multiple times in run
time (each time application starts...).

Thanks,

-- Shaul Dar (shauld@xxxxxxxxxx)

References:

http://www.dotnet247.com/247reference/msgs/25/128911.aspx

http://groups.google.co.il/groups?l=iw&lr=lang_en|lang_iw&threadm=03bf01c2d7b1%2494747ac0%24a301280a%40phx.gbl&rnum=1&prev=/groups%3Fhl%3Diw%26lr%3Dlang_en%257Clang_iw%26selm%3D03bf01c2d7b1%252494747ac0%2524a301280a%2540phx.gbl

http://groups.google.co.il/groups?th=36163f6e8be7f0bd&seekm=%2333t65aHEHA.3696%40TK2MSFTNGP10.phx.gbl#link2
.



Relevant Pages

  • RE: SOAP .Net client wrapper questions
    ... on the client side or the web service side? ... for the web service and that didn't produce any result. ... automatic Proxy setting detection, and that seems like it might be involved. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Attachments.Add - Object reference not set to an instance of an object.
    ... webservice projects in a signle solution, Visual Studio does not create the ... webservice to the client project; ... Visual Studio created the proxy ... > Enable Microsoft Web Service Enhancement SOAP Extension are checked. ...
    (microsoft.public.dotnet.framework.webservices)
  • XsdObjectGen classes in Web Service Client Proxy
    ... Does anyone know how I can get a web service client proxy to use classes ... class and not the more user-friendly XsdObjectGen class. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Windows Client using Generated WS Proxy
    ... > The solution I used was to generate one proxy using the tool and then I ... > we had very good designs on our webservices before we started client side ... >> that represent the data that goes to and from the web service. ... the typical sort of thing is a Customer or an Account. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • RE: Windows Client using Generated WS Proxy
    ... The solution I used was to generate one proxy using the tool and then I ... > How many people are using a windows client to talk to their web service? ... > that represent the data that goes to and from the web service. ... the typical sort of thing is a Customer or an Account. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)