By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,022 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

performance difference in Webservice -'Normal' way

P: n/a
Hi,

I'm new to WebServices, and I'm doing some tests (with a small
VB.NET-application) to know the performance-difference between a WebService
and the 'normal'-way of getting data (just connecting directly with a
SqlDataAdapter to the SQL Server). The WebMethod simply gives a DataSet
back, and does exactly the same actions as the normal-Method does.

The difference are enormous in my opinion:
1 record:
WebService: 0,03125 seconds
Normal: 0,0156 seconds ->only 50% of WebService

10 records:
WebService: 0,0468 seconds
Normal: 0,016 seconds -> only 33,33% of WebService

100 records:
WebService: 0,125 seconds
Normal: 0,0156 seconds -> only 12,5% of WebService

1000 records:
WebService: 1,14 seconds
Normal: 0,93 seconds -> only 8,22% of WebService

How does this come? The webservice is even local! So I guess it will take
much more time when it wil be on another Server...
Is there a way to have a better performance? and why using WebServices if
they score so bad in performance?

Thanks a lot in advance for any hints etc

Pieter
Nov 23 '05 #1
Share this Question
Share on Google+
14 Replies


P: n/a
1. Do your tests in a loop 100 times. Or 1000 times. That will be more
accurate.
2. Web services take time because the request has to be packaged and sent.
Data has to be serialized and deserialized. Requests have to be processed
and responses sent. Even if it all on the same machine.

But yes, calling a web service will always be slower then executing code
directly. That is why you don't want to do it unless your application
requires it.

"DraguVaso" <pi**********@hotmail.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Hi,

I'm new to WebServices, and I'm doing some tests (with a small
VB.NET-application) to know the performance-difference between a
WebService
and the 'normal'-way of getting data (just connecting directly with a
SqlDataAdapter to the SQL Server). The WebMethod simply gives a DataSet
back, and does exactly the same actions as the normal-Method does.

The difference are enormous in my opinion:
1 record:
WebService: 0,03125 seconds
Normal: 0,0156 seconds ->only 50% of WebService

10 records:
WebService: 0,0468 seconds
Normal: 0,016 seconds -> only 33,33% of WebService

100 records:
WebService: 0,125 seconds
Normal: 0,0156 seconds -> only 12,5% of WebService

1000 records:
WebService: 1,14 seconds
Normal: 0,93 seconds -> only 8,22% of WebService

How does this come? The webservice is even local! So I guess it will take
much more time when it wil be on another Server...
Is there a way to have a better performance? and why using WebServices if
they score so bad in performance?

Thanks a lot in advance for any hints etc

Pieter

Nov 23 '05 #2

P: n/a
1. Do your tests in a loop 100 times. Or 1000 times. That will be more
accurate.
2. Web services take time because the request has to be packaged and sent.
Data has to be serialized and deserialized. Requests have to be processed
and responses sent. Even if it all on the same machine.

But yes, calling a web service will always be slower then executing code
directly. That is why you don't want to do it unless your application
requires it.

"DraguVaso" <pi**********@hotmail.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Hi,

I'm new to WebServices, and I'm doing some tests (with a small
VB.NET-application) to know the performance-difference between a
WebService
and the 'normal'-way of getting data (just connecting directly with a
SqlDataAdapter to the SQL Server). The WebMethod simply gives a DataSet
back, and does exactly the same actions as the normal-Method does.

The difference are enormous in my opinion:
1 record:
WebService: 0,03125 seconds
Normal: 0,0156 seconds ->only 50% of WebService

10 records:
WebService: 0,0468 seconds
Normal: 0,016 seconds -> only 33,33% of WebService

100 records:
WebService: 0,125 seconds
Normal: 0,0156 seconds -> only 12,5% of WebService

1000 records:
WebService: 1,14 seconds
Normal: 0,93 seconds -> only 8,22% of WebService

How does this come? The webservice is even local! So I guess it will take
much more time when it wil be on another Server...
Is there a way to have a better performance? and why using WebServices if
they score so bad in performance?

Thanks a lot in advance for any hints etc

Pieter

Nov 23 '05 #3

P: n/a
Thanks!
And isn't there any way to to speed things up a little bit? The fact is: in
my case it could be helpfull, because it should be used by our own people
(Windows Forms application), and give a consultancy-option to our Clients
(Web interface).

But why are people giving such an importance to XML Webservices? I know some
big software-companies that pass everything by a WebServices, even local
Windows forms applications. I was alreaddy sceptic about the technique, but
now I am even more sceptic to use it... :-/
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Hi,

I'm new to WebServices, and I'm doing some tests (with a small
VB.NET-application) to know the performance-difference between a
WebService
and the 'normal'-way of getting data (just connecting directly with a
SqlDataAdapter to the SQL Server). The WebMethod simply gives a DataSet
back, and does exactly the same actions as the normal-Method does.

The difference are enormous in my opinion:
1 record:
WebService: 0,03125 seconds
Normal: 0,0156 seconds ->only 50% of WebService

10 records:
WebService: 0,0468 seconds
Normal: 0,016 seconds -> only 33,33% of WebService

100 records:
WebService: 0,125 seconds
Normal: 0,0156 seconds -> only 12,5% of WebService

1000 records:
WebService: 1,14 seconds
Normal: 0,93 seconds -> only 8,22% of WebService

How does this come? The webservice is even local! So I guess it will take
much more time when it wil be on another Server...
Is there a way to have a better performance? and why using WebServices if
they score so bad in performance?

Thanks a lot in advance for any hints etc

Pieter

Nov 23 '05 #4

P: n/a
Thanks!
And isn't there any way to to speed things up a little bit? The fact is: in
my case it could be helpfull, because it should be used by our own people
(Windows Forms application), and give a consultancy-option to our Clients
(Web interface).

But why are people giving such an importance to XML Webservices? I know some
big software-companies that pass everything by a WebServices, even local
Windows forms applications. I was alreaddy sceptic about the technique, but
now I am even more sceptic to use it... :-/
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Hi,

I'm new to WebServices, and I'm doing some tests (with a small
VB.NET-application) to know the performance-difference between a
WebService
and the 'normal'-way of getting data (just connecting directly with a
SqlDataAdapter to the SQL Server). The WebMethod simply gives a DataSet
back, and does exactly the same actions as the normal-Method does.

The difference are enormous in my opinion:
1 record:
WebService: 0,03125 seconds
Normal: 0,0156 seconds ->only 50% of WebService

10 records:
WebService: 0,0468 seconds
Normal: 0,016 seconds -> only 33,33% of WebService

100 records:
WebService: 0,125 seconds
Normal: 0,0156 seconds -> only 12,5% of WebService

1000 records:
WebService: 1,14 seconds
Normal: 0,93 seconds -> only 8,22% of WebService

How does this come? The webservice is even local! So I guess it will take
much more time when it wil be on another Server...
Is there a way to have a better performance? and why using WebServices if
they score so bad in performance?

Thanks a lot in advance for any hints etc

Pieter

Nov 23 '05 #5

P: n/a
Hello DraguVaso,

Thanks!
And isn't there any way to to speed things up a little bit? The fact
is: in
my case it could be helpfull, because it should be used by our own
people
(Windows Forms application), and give a consultancy-option to our
Clients
(Web interface).
But why are people giving such an importance to XML Webservices?
Web services offer service consumers a standard way to consume the services
from the service providers in a platform agnostic manner. Before the emergence
of WS, we were to provide our clients with dlls, proxy software etc so that
they can consume our services. Again we had to maintain multiple setups for
clients with different platforms. As web services use industry accepted protocols
for data messaging and transport bindings, we are relieved from the pain
of maintaing client specific infrasture at the service provider end.

As the message are transported in the form of XML, they are serialized at
the server side and deserialized at the client end and they are transported
currently over http and are bound to be slow.

If you are .NET client you can speed up your perception of speed by using
Async web methods.
I know some big software-companies that pass everything by a
WebServices, even local Windows forms applications. I was alreaddy
sceptic about the technique, but now I am even more sceptic to use
it... :-/

"DraguVaso" <pi**********@hotmail.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Hi,

I'm new to WebServices, and I'm doing some tests (with a small
VB.NET-application) to know the performance-difference between a
WebService
and the 'normal'-way of getting data (just connecting directly with a
SqlDataAdapter to the SQL Server). The WebMethod simply gives a
DataSet
back, and does exactly the same actions as the normal-Method does.
The difference are enormous in my opinion:
1 record:
WebService: 0,03125 seconds
Normal: 0,0156 seconds ->only 50% of WebService
10 records:
WebService: 0,0468 seconds
Normal: 0,016 seconds -> only 33,33% of WebService
100 records:
WebService: 0,125 seconds
Normal: 0,0156 seconds -> only 12,5% of WebService
1000 records:
WebService: 1,14 seconds
Normal: 0,93 seconds -> only 8,22% of WebService
How does this come? The webservice is even local! So I guess it will
take
much more time when it wil be on another Server...
Is there a way to have a better performance? and why using
WebServices if
they score so bad in performance?
Thanks a lot in advance for any hints etc

Pieter


Nov 23 '05 #6

P: n/a
Hello DraguVaso,

Thanks!
And isn't there any way to to speed things up a little bit? The fact
is: in
my case it could be helpfull, because it should be used by our own
people
(Windows Forms application), and give a consultancy-option to our
Clients
(Web interface).
But why are people giving such an importance to XML Webservices?
Web services offer service consumers a standard way to consume the services
from the service providers in a platform agnostic manner. Before the emergence
of WS, we were to provide our clients with dlls, proxy software etc so that
they can consume our services. Again we had to maintain multiple setups for
clients with different platforms. As web services use industry accepted protocols
for data messaging and transport bindings, we are relieved from the pain
of maintaing client specific infrasture at the service provider end.

As the message are transported in the form of XML, they are serialized at
the server side and deserialized at the client end and they are transported
currently over http and are bound to be slow.

If you are .NET client you can speed up your perception of speed by using
Async web methods.
I know some big software-companies that pass everything by a
WebServices, even local Windows forms applications. I was alreaddy
sceptic about the technique, but now I am even more sceptic to use
it... :-/

"DraguVaso" <pi**********@hotmail.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Hi,

I'm new to WebServices, and I'm doing some tests (with a small
VB.NET-application) to know the performance-difference between a
WebService
and the 'normal'-way of getting data (just connecting directly with a
SqlDataAdapter to the SQL Server). The WebMethod simply gives a
DataSet
back, and does exactly the same actions as the normal-Method does.
The difference are enormous in my opinion:
1 record:
WebService: 0,03125 seconds
Normal: 0,0156 seconds ->only 50% of WebService
10 records:
WebService: 0,0468 seconds
Normal: 0,016 seconds -> only 33,33% of WebService
100 records:
WebService: 0,125 seconds
Normal: 0,0156 seconds -> only 12,5% of WebService
1000 records:
WebService: 1,14 seconds
Normal: 0,93 seconds -> only 8,22% of WebService
How does this come? The webservice is even local! So I guess it will
take
much more time when it wil be on another Server...
Is there a way to have a better performance? and why using
WebServices if
they score so bad in performance?
Thanks a lot in advance for any hints etc

Pieter


Nov 23 '05 #7

P: n/a
DraguVaso wrote:
[snip]
But why are people giving such an importance to XML Webservices? I


Because it has an X in its name :-(

Andrew
Nov 23 '05 #8

P: n/a
DraguVaso wrote:
[snip]
But why are people giving such an importance to XML Webservices? I


Because it has an X in its name :-(

Andrew
Nov 23 '05 #9

P: n/a
Do you remember when everybody was talking about IA engines ;-) I meant that
"hot stuff" is discussed likely more without necessarily reflecting real
use.
You could try a monitoring tool to make sure it goes into serializing/http
transmission/deserializing. By constrast ADO.NET uses the native SQL Server
protocol.

For now it doesn't look that bad to me. IMO the real question is how much
often do you need to call this ?

It greatly depends on the kind of application you are writing (for some
applications you could even use a "checkout", "checkin" model that would
allow to work locally a while before making new data available).

In any case you are not forced to use web services if this is not needed...
--

Patrice

"Andrew Morton" <ak*@in-press.co.uk.invalid> a écrit dans le message de
news:eN**************@tk2msftngp13.phx.gbl...
DraguVaso wrote:
[snip]
But why are people giving such an importance to XML Webservices? I


Because it has an X in its name :-(

Andrew

Nov 23 '05 #10

P: n/a
Do you remember when everybody was talking about IA engines ;-) I meant that
"hot stuff" is discussed likely more without necessarily reflecting real
use.
You could try a monitoring tool to make sure it goes into serializing/http
transmission/deserializing. By constrast ADO.NET uses the native SQL Server
protocol.

For now it doesn't look that bad to me. IMO the real question is how much
often do you need to call this ?

It greatly depends on the kind of application you are writing (for some
applications you could even use a "checkout", "checkin" model that would
allow to work locally a while before making new data available).

In any case you are not forced to use web services if this is not needed...
--

Patrice

"Andrew Morton" <ak*@in-press.co.uk.invalid> a écrit dans le message de
news:eN**************@tk2msftngp13.phx.gbl...
DraguVaso wrote:
[snip]
But why are people giving such an importance to XML Webservices? I


Because it has an X in its name :-(

Andrew

Nov 23 '05 #11

P: n/a
hi
My opinin is different time is not at all issue for today's high speed
processor.
you can compromise time by compatible hardware.but in future if you need to
built onother application for your company then you can use existing web
services and devlopment will be faster

--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in
"DraguVaso" wrote:
Thanks!
And isn't there any way to to speed things up a little bit? The fact is: in
my case it could be helpfull, because it should be used by our own people
(Windows Forms application), and give a consultancy-option to our Clients
(Web interface).

But why are people giving such an importance to XML Webservices? I know some
big software-companies that pass everything by a WebServices, even local
Windows forms applications. I was alreaddy sceptic about the technique, but
now I am even more sceptic to use it... :-/
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Hi,

I'm new to WebServices, and I'm doing some tests (with a small
VB.NET-application) to know the performance-difference between a
WebService
and the 'normal'-way of getting data (just connecting directly with a
SqlDataAdapter to the SQL Server). The WebMethod simply gives a DataSet
back, and does exactly the same actions as the normal-Method does.

The difference are enormous in my opinion:
1 record:
WebService: 0,03125 seconds
Normal: 0,0156 seconds ->only 50% of WebService

10 records:
WebService: 0,0468 seconds
Normal: 0,016 seconds -> only 33,33% of WebService

100 records:
WebService: 0,125 seconds
Normal: 0,0156 seconds -> only 12,5% of WebService

1000 records:
WebService: 1,14 seconds
Normal: 0,93 seconds -> only 8,22% of WebService

How does this come? The webservice is even local! So I guess it will take
much more time when it wil be on another Server...
Is there a way to have a better performance? and why using WebServices if
they score so bad in performance?

Thanks a lot in advance for any hints etc

Pieter


Nov 23 '05 #12

P: n/a
hi
My opinin is different time is not at all issue for today's high speed
processor.
you can compromise time by compatible hardware.but in future if you need to
built onother application for your company then you can use existing web
services and devlopment will be faster

--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in
"DraguVaso" wrote:
Thanks!
And isn't there any way to to speed things up a little bit? The fact is: in
my case it could be helpfull, because it should be used by our own people
(Windows Forms application), and give a consultancy-option to our Clients
(Web interface).

But why are people giving such an importance to XML Webservices? I know some
big software-companies that pass everything by a WebServices, even local
Windows forms applications. I was alreaddy sceptic about the technique, but
now I am even more sceptic to use it... :-/
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Hi,

I'm new to WebServices, and I'm doing some tests (with a small
VB.NET-application) to know the performance-difference between a
WebService
and the 'normal'-way of getting data (just connecting directly with a
SqlDataAdapter to the SQL Server). The WebMethod simply gives a DataSet
back, and does exactly the same actions as the normal-Method does.

The difference are enormous in my opinion:
1 record:
WebService: 0,03125 seconds
Normal: 0,0156 seconds ->only 50% of WebService

10 records:
WebService: 0,0468 seconds
Normal: 0,016 seconds -> only 33,33% of WebService

100 records:
WebService: 0,125 seconds
Normal: 0,0156 seconds -> only 12,5% of WebService

1000 records:
WebService: 1,14 seconds
Normal: 0,93 seconds -> only 8,22% of WebService

How does this come? The webservice is even local! So I guess it will take
much more time when it wil be on another Server...
Is there a way to have a better performance? and why using WebServices if
they score so bad in performance?

Thanks a lot in advance for any hints etc

Pieter


Nov 23 '05 #13

P: n/a
What do you mean with "compatbile hardware"? :-)
Will my Webservice have much better performance when turning on a real
server (better processor, more ram) than my local pc? Or will the
network-than consume more?

"MAHESH MANDHARE" <ma***************@yahoo.co.in> wrote in message
news:B0**********************************@microsof t.com...
hi
My opinin is different time is not at all issue for today's high speed
processor.
you can compromise time by compatible hardware.but in future if you need to built onother application for your company then you can use existing web
services and devlopment will be faster

--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in
"DraguVaso" wrote:
Thanks!
And isn't there any way to to speed things up a little bit? The fact is: in my case it could be helpfull, because it should be used by our own people (Windows Forms application), and give a consultancy-option to our Clients (Web interface).

But why are people giving such an importance to XML Webservices? I know some big software-companies that pass everything by a WebServices, even local
Windows forms applications. I was alreaddy sceptic about the technique, but now I am even more sceptic to use it... :-/
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Hi,

I'm new to WebServices, and I'm doing some tests (with a small
VB.NET-application) to know the performance-difference between a
WebService
and the 'normal'-way of getting data (just connecting directly with a
SqlDataAdapter to the SQL Server). The WebMethod simply gives a DataSet back, and does exactly the same actions as the normal-Method does.

The difference are enormous in my opinion:
1 record:
WebService: 0,03125 seconds
Normal: 0,0156 seconds ->only 50% of WebService

10 records:
WebService: 0,0468 seconds
Normal: 0,016 seconds -> only 33,33% of WebService

100 records:
WebService: 0,125 seconds
Normal: 0,0156 seconds -> only 12,5% of WebService

1000 records:
WebService: 1,14 seconds
Normal: 0,93 seconds -> only 8,22% of WebService

How does this come? The webservice is even local! So I guess it will take much more time when it wil be on another Server...
Is there a way to have a better performance? and why using WebServices if they score so bad in performance?

Thanks a lot in advance for any hints etc

Pieter


Nov 23 '05 #14

P: n/a
What do you mean with "compatbile hardware"? :-)
Will my Webservice have much better performance when turning on a real
server (better processor, more ram) than my local pc? Or will the
network-than consume more?

"MAHESH MANDHARE" <ma***************@yahoo.co.in> wrote in message
news:B0**********************************@microsof t.com...
hi
My opinin is different time is not at all issue for today's high speed
processor.
you can compromise time by compatible hardware.but in future if you need to built onother application for your company then you can use existing web
services and devlopment will be faster

--
Have A Good Day,
Mahesh,
Ma************@yahoo.co.in
"DraguVaso" wrote:
Thanks!
And isn't there any way to to speed things up a little bit? The fact is: in my case it could be helpfull, because it should be used by our own people (Windows Forms application), and give a consultancy-option to our Clients (Web interface).

But why are people giving such an importance to XML Webservices? I know some big software-companies that pass everything by a WebServices, even local
Windows forms applications. I was alreaddy sceptic about the technique, but now I am even more sceptic to use it... :-/
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Hi,

I'm new to WebServices, and I'm doing some tests (with a small
VB.NET-application) to know the performance-difference between a
WebService
and the 'normal'-way of getting data (just connecting directly with a
SqlDataAdapter to the SQL Server). The WebMethod simply gives a DataSet back, and does exactly the same actions as the normal-Method does.

The difference are enormous in my opinion:
1 record:
WebService: 0,03125 seconds
Normal: 0,0156 seconds ->only 50% of WebService

10 records:
WebService: 0,0468 seconds
Normal: 0,016 seconds -> only 33,33% of WebService

100 records:
WebService: 0,125 seconds
Normal: 0,0156 seconds -> only 12,5% of WebService

1000 records:
WebService: 1,14 seconds
Normal: 0,93 seconds -> only 8,22% of WebService

How does this come? The webservice is even local! So I guess it will take much more time when it wil be on another Server...
Is there a way to have a better performance? and why using WebServices if they score so bad in performance?

Thanks a lot in advance for any hints etc

Pieter


Nov 23 '05 #15

This discussion thread is closed

Replies have been disabled for this discussion.