473,503 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IIS performance sending XmlDocument


I wrote a c# web service that sends an XmlDocument as a return type.

When I run it on a w2k iis machine, it takes 35s to 45s to send the data
to a client (I wrote a smart client c# app to consume it, but I also
tested with a browser).

Question: is there any way for me to speed up the performance of my web
server?

Oddly, when I run it on my dev machine, an XP workstation, it only takes
10s for the browser to get the data.
Jan 20 '06 #1
7 1424
Have you tried running it several times in a row? The first request has to
create the application.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"John Bailo" <ja*****@texeme.com> wrote in message
news:HI******************************@speakeasy.ne t...

I wrote a c# web service that sends an XmlDocument as a return type.

When I run it on a w2k iis machine, it takes 35s to 45s to send the data
to a client (I wrote a smart client c# app to consume it, but I also
tested with a browser).

Question: is there any way for me to speed up the performance of my web
server?

Oddly, when I run it on my dev machine, an XP workstation, it only takes
10s for the browser to get the data.

Jan 20 '06 #2
Kevin Spencer wrote:
Have you tried running it several times in a row? The first request has to
create the application.


Yes, it consistently takes that long to send the Xml data.

Jan 20 '06 #3

I checked the size of the send, and the total amount of data delivered
is 288 KB (294,912 bytes).

That shouldn't take 35 - 45 seconds, should it?

John Bailo wrote:

I wrote a c# web service that sends an XmlDocument as a return type.

When I run it on a w2k iis machine, it takes 35s to 45s to send the data
to a client (I wrote a smart client c# app to consume it, but I also
tested with a browser).

Question: is there any way for me to speed up the performance of my web
server?

Oddly, when I run it on my dev machine, an XP workstation, it only takes
10s for the browser to get the data.

Jan 20 '06 #4
Hi John,

It must have something to do with the OS or the hardware. I must confess I
don't run .Net apps on Windows 2000, so I can't really tell you for sure.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"John Bailo" <ja*****@texeme.com> wrote in message
news:43**************@texeme.com...
Kevin Spencer wrote:
Have you tried running it several times in a row? The first request has
to create the application.


Yes, it consistently takes that long to send the Xml data.

Jan 21 '06 #5

I did some more testing in an attempt to understand why it takes the
..net web service 35-45s to deliver a 300K xml value to the client.
I used VS.NET and set breakpoints to see how long each of the first
steps takes:

Time to return data to data reader <1s
Time to create the XML document from data <1s

At this point the XML return value from the web method is ready to
send...so it's not in the code.

Then what I did is save the resulting XML as a file, and try to send it
as a static document, to see if its the webserver or the network:

The time for this is:

Time to send the data over the network 11s

Then I tested it running the browser on the web server, so it wasn't
going out on the network:

Time to load page into IIS and send 1-2s
So, sending the file over the network definitely adds time -- and tells
me our network is quite slow since this is a relatively small file. But
it doesn't explain the other 20-30s in sending the XML via the web
server. Could it be:

Time to serialize XML data ?20-30s

That is, does IIS/.NET take that long to encapsulate the data as a SOAP
object?

Or can someone suggest another cause?

Kevin Spencer wrote:
Hi John,

It must have something to do with the OS or the hardware. I must confess I
don't run .Net apps on Windows 2000, so I can't really tell you for sure.

Jan 23 '06 #6

Ok, I did one more test.

I exposed this web service from my development machine, an XP Pro with
P4, and from two other machines, the total time to receive all the XML
from the web method was 4-8s !!

I guess that means the web server is /dog/ /slow/ !

It's a 2000 machine, so I don't know what i can do in terms of the web
server to speed it up...
John Bailo wrote:

I did some more testing in an attempt to understand why it takes the
.net web service 35-45s to deliver a 300K xml value to the client.
I used VS.NET and set breakpoints to see how long each of the first
steps takes:

Time to return data to data reader <1s
Time to create the XML document from data <1s

At this point the XML return value from the web method is ready to
send...so it's not in the code.

Then what I did is save the resulting XML as a file, and try to send it
as a static document, to see if its the webserver or the network:

The time for this is:

Time to send the data over the network 11s

Then I tested it running the browser on the web server, so it wasn't
going out on the network:

Time to load page into IIS and send 1-2s
So, sending the file over the network definitely adds time -- and tells
me our network is quite slow since this is a relatively small file. But
it doesn't explain the other 20-30s in sending the XML via the web
server. Could it be:

Time to serialize XML data ?20-30s

That is, does IIS/.NET take that long to encapsulate the data as a SOAP
object?

Or can someone suggest another cause?

Kevin Spencer wrote:
Hi John,

It must have something to do with the OS or the hardware. I must
confess I don't run .Net apps on Windows 2000, so I can't really tell
you for sure.

Jan 23 '06 #7

Ok, it gets odder.

I rebooted my web server and now it takes like 5 seconds to run the web
method and send the data!

There were some pending updates to be installed that were there for
weeks -- I kind of wonder if these would drag down performance because
the MS Update just sits there and polls to tell the user to install the
updates.

Still, more likely is...what...that IIS 5.0's cache wasn't clearing?

Mmm...
John Bailo wrote:

Ok, I did one more test.

I exposed this web service from my development machine, an XP Pro with
P4, and from two other machines, the total time to receive all the XML
from the web method was 4-8s !!

I guess that means the web server is /dog/ /slow/ !

It's a 2000 machine, so I don't know what i can do in terms of the web
server to speed it up...
John Bailo wrote:

I did some more testing in an attempt to understand why it takes the
.net web service 35-45s to deliver a 300K xml value to the client.
I used VS.NET and set breakpoints to see how long each of the first
steps takes:

Time to return data to data reader <1s
Time to create the XML document from data <1s

At this point the XML return value from the web method is ready to
send...so it's not in the code.

Then what I did is save the resulting XML as a file, and try to send
it as a static document, to see if its the webserver or the network:

The time for this is:

Time to send the data over the network 11s

Then I tested it running the browser on the web server, so it wasn't
going out on the network:

Time to load page into IIS and send 1-2s
So, sending the file over the network definitely adds time -- and
tells me our network is quite slow since this is a relatively small
file. But it doesn't explain the other 20-30s in sending the XML via
the web server. Could it be:

Time to serialize XML data ?20-30s

That is, does IIS/.NET take that long to encapsulate the data as a
SOAP object?

Or can someone suggest another cause?

Kevin Spencer wrote:
Hi John,

It must have something to do with the OS or the hardware. I must
confess I don't run .Net apps on Windows 2000, so I can't really tell
you for sure.

Jan 23 '06 #8

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...
0
2096
by: Abra | last post by:
Hi I have a program that works a lot with .NET's XMLDOM. It creates nodes, appends them to one another (creating a tree), then imports nodes from other documents into this main one and appends...
1
4323
by: Andrew Jacobs | last post by:
I am using C# to write an application that migrates documents from one version of an XML schema/DTD to later one. Much of the document has the same structure in the two versions and I use...
1
4280
by: John A Grandy | last post by:
I've got an app that has hundreds of medium-sized (100s of elements) XML files on disk (not in db). Right now these are loaded via XMLDocument.Load and searched with XPATH. The performance has...
7
7107
by: Dima | last post by:
Call to XmlNode.GetElementsByTagName returns XmlNodeList that stays in sync with XmlDocument thanks to events fired by XmlDocument. Once this list is created there is no way to remove its event...
7
5533
by: Bob Garbados | last post by:
I need to construct an xml document, send it to a service over tcp/ip to a specified port, receive the xml response, and process the xml response. I can create the xml document to send, but what's...
2
1407
by: Mark | last post by:
Hi... We've been doing some basic performance testing comparing asp, asp.net, mono, and php. One of the basic tests is on simply parsing an xml document and streaming the result back to the...
1
1584
by: RK | last post by:
What is the difference in performance if using XmlDocument or XmlElement as parameter in C# class method. thanks in advance. --RK
5
6258
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... I've been trying to improve the performance of our xml handling, so I've been doing some timing tests lately and ran across something I thought odd - XPathDocument seems slightly slower...
0
7202
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,...
0
7086
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...
0
7280
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,...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
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...
0
4673
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...
0
3167
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...
0
1512
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 ...
0
382
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.