473,760 Members | 9,717 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

performance difference in Webservice -'Normal' way

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
14 2508
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**********@h otmail.com> wrote in message
news:Od******** ******@TK2MSFTN GP10.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
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**********@h otmail.com> wrote in message
news:Od******** ******@TK2MSFTN GP10.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
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**********@h otmail.com> wrote in message
news:Od******** ******@TK2MSFTN GP10.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
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**********@h otmail.com> wrote in message
news:Od******** ******@TK2MSFTN GP10.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
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**********@h otmail.com> wrote in message
news:Od******** ******@TK2MSFTN GP10.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
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**********@h otmail.com> wrote in message
news:Od******** ******@TK2MSFTN GP10.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
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
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
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.inv alid> a écrit dans le message de
news:eN******** ******@tk2msftn gp13.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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
471
by: John Bailo | last post by:
I wrote a webservice to output a report file. The fields of the report are formatted based on information in an in-memory XmlDocument. As each row of a SqlDataReader are looped through, a lookup is done, and format information retrieved. The performance was extremely poor -- producing about 1000 rows per minute. However, when I used tracing/logging, my results were inconclusive. First of all, based on the size of the data and the...
5
357
by: DraguVaso | last post by:
Hi, I need to write a VB.NET-application (Windows Forms) that may have a part of it (re-)implemented as a Webpage for the customers. I think it can be usefull to create a business Layer with Remoting or a XML Webservice, and than write my Windows Forms application that uses it. and than maybe in the future the Webclient. I have jsut one question: I hate the performance/speed-problems with
4
4326
by: Matt Garman | last post by:
Is there any difference, performance-wise, accessing elements of a vector using iterators or the subscript operator? In other words, say I have a vector of strings: vector<string> strvec; After some processing, the vector has a very large (>50,000) number of elements. Is there any performance difference in the following methods of vector access?
25
1914
by: Daniel P. | last post by:
MS or anyone still claims that C# and VB.NET generate the exact same IL code? http://www.osnews.com/story.php?news_id=5602&page=3
6
1717
by: Mike | last post by:
Lets just say my app is done HOO HOO. Now, I'm accessing the database via a web service and one thing i noticed that my app is running real slow. When I first started working on the app is ran pretty quick returned the data to the screens in about 2 - 3 seconds. Now its going about 5 - 10 seconds. How can I beef it up for better performance.
1
6739
by: Lakshmi | last post by:
Hi All, I am having performance issues with the .NET client calling the Java Webservice running on axis. Have detailed the problem below. Please help. I wrote a webservice in Java. Lets name this WebService1. (using Apache Axis 1.1) Scenario 1: -----------
3
2409
by: Alexis | last post by:
Hello, I have developted a webservice application. The application has a few webservices each webservice with their own webmethods of course. I want to measure the performance of my site. I look at the Application Center Test of Visual Studio Enterprice edition, but can not make it to work with the web services. I can't figure out how to call the web services from an ACT test. It seems it only can work with aspx pages not web services asmx...
15
1365
by: MuZZy | last post by:
Hi, Consider this: ArrayList al = new ArrayList(); FillList(al); /// NOW TWO SCENARIOS: /// 1. for (int i = 0 ; i < al.Count ; i++)
2
1552
by: Islamegy® | last post by:
I have a Dynamic Page which alow user to choose User-control from a DropDownList like in DotNetNuke then i load it using LoadControl() method. But i suffer from slow Performance, I was use ObjectDatasource but i replaced it by Async code to call my webservice... I'm sure it's not a problem of my webservice since i used it before and it work so fine. I did alot of work to implement Async but it didn't help much I think to remove all code...
30
3543
by: galiorenye | last post by:
Hi, Given this code: A** ppA = new A*; A *pA = NULL; for(int i = 0; i < 10; ++i) { pA = ppA; //do something with pA
0
9521
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9333
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10107
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9945
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9765
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7324
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3442
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.