Click here to Skip to main content
15,891,976 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a web service running on a local network but to call a webmethod only passing an integer which does nothing and returns nothing takes 217milliseconds. If I run the web service on my local machine it only takes 19 milliseconds. Can anyone give any advice on speeding this up?
Posted

Calling a web method on a remote hosted web service will always be slower of course....it's got to make the round trip to the server

If you are confident your network settings are all correct, there's no real way to speed this up
 
Share this answer
 
NO. these figures are very reasonable. You'll find that when you start doing something usefull with your web service, the time disparity decreases. (you spend most of your time now on establishing context, packaging stuff on the wire, etc...) and zero time in your service. When you really start using webservices, take care so that you do't make them too fine-grained. A Web service should do a reasonable amount of work (like reading many records and processing many records) on a round-trip.
If you call your web-service for every single little thing, you're better of connecting to the database directly, if that's your purpose (except that this will create a 2-tier architecture, which is also evil).
 
Share this answer
 
Comments
caksabre2 4-May-10 10:12am    
Is there an alternative to web services that is faster. As I have a time critical application, that currently I have passing information from a client to a server via a web service. So the client calls the web service, which then sends a message to the server. Is there a better faster solution to this?
You could run a long piece of Cat5 cable between your machine and the server.
 
Share this answer
 
Comments
caksabre2 4-May-10 10:13am    
I have a short piece of cat5 between my machine and the server (in the same room). Still getting these speeds.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900