473,883 Members | 2,178 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 2522
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
4331
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
1923
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
1722
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
6747
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
2416
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
1370
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
1557
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
3589
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
9798
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
11164
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
10767
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
10422
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...
0
9588
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7980
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
7137
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
6008
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4623
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.