Performance tuning in web service

N

Nirajshah

I am using a web service for retrieving the data from SQL Server
table having 29,000 records in a datagrid placed on the windows form
in .net. It takes about 36 seconds to retrieve the data eventhough
the service is running on a local computer. Without using service ,
the data is fetched within 5 seconds. So in this case what can I do
to reduce the time taken using the web service ?
 
K

Ken Dopierala Jr.

Hi,

When you retrieve the data without using the webservice are you going
straight to SQL Server? If so, here is what I'm thinking:

1. SQL is doing the query pretty fast and dishing it back to you. The
dishing probably takes a little over 4 seconds.
2. In a perfect world, using the web service, you should get the data in a
about 10 seconds. We can't expect the WS to dish the data after the query
processes faster than SQL.
3. The web service must serialize the data into XML. This increases the
size big time.

So here is where we are at:

The serialization is going to take much longer than the query. The dishing
of the serialized data is going to take much longer.

Here is how I would solve this problem:

First, I would time the operations to see which ones are taking the longest.
Second, I would either fix, or find new solutions to these problems.

Time your calls and see where the extra 26 seconds is occuring. Once you
know that, report back and let's sit down and figure out a solution. Good
luck! Ken.
 
A

Arnthor

Hi Nirajshah

Are you allowing anonymus access to the webservice or are you using windows
security mechanism? If you are that puts a big performance cost on your
webservice. One way around it is doing the following:

wsProxy.UnsafeAuthenticatedConnectionSharing = true;
wsProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
wsProxy.ConnectionGroupName = [windowsusername];

Br.
Arnthor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top