Groups | Blog | Home
all groups > dotnet web services > january 2005 >

dotnet web services : Web Service Performance seems very slow. Please help!



Ken Varn
1/28/2005 3:56:03 PM
I have just started playing around with Web Services. I created a sample
Web Service and invoked a sample "Hello World" method call from my Win Forms
control running under an ASP.NET web page. The time it takes to return the
result seems a little bit much. It takes anywhere from 500 to 800
milliseconds to return a simple "Hello World" string message. This is even
running it on localhost. Is this normal for the request to take this long?
If not, what can I do to make it faster?

Here is an example of my calling logic:

private void DoCall()
{
String ServiceText;
ICredentials myCred;
MyWebService TestService = new MyWebService();

myCred = new NetworkCredential("userid","password");
TestService.Credentials = myCred;

ServiceText = TestService.HelloWorld(); // This call seems
very slow.
}

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------

Ken Varn
2/1/2005 9:18:22 AM
I solved my own problem. I saw a KB article (810814) on the subject in .NET
Framework 1.0. The solution still applies to 1.1 when it comes to the
machine.config settings. I had to add the following to machine.config to
help speed it up.

<system.net>
<settings>
<servicePointManager useNagleAlgorithm="false"/>
<servicePointManager expect100Continue="false"/>
</settings>
</system.net>

The performance increase was substantial with these settings in place. Not
sure if there are any other ramifications to using these settings.


--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
[quoted text, click to view]

AddThis Social Bookmark Button