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 ?
Ken Dopierala Jr. - 17 Oct 2004 04:30 GMT
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.

Signature
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.
> 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 ?
Arnthor - 10 Nov 2004 11:17 GMT
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
> 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 ?