Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Web Services Very Slow...Please help

Reply
Thread Tools

Web Services Very Slow...Please help

 
 
amqazi@gmail.com
Guest
Posts: n/a
 
      11-22-2005
We have an application that we recently converted to VB.Net. The
database access layer has been converted to a web service. We have
noticed a significant reduction in the speed of database calls. This is
a high availability application and each moderate size query to an SQL
server takes about 10 to 15 seconds. We could not resolve this problem
so we switched the database access component back to a .Net written
COM+ component, and the speed has improved a lot.
I would love some advice on how to speed up the database calls. I also
noticed that each time I would assign a value to the URL property of
the component to prepare it for connecting to the web service, the web
service would recompile itself. Is that true?

Thanks a bunch.

AD

 
Reply With Quote
 
 
 
 
Peter Kelcey
Guest
Posts: n/a
 
      11-24-2005
AD

It's definitely not surprising that your data access slowed down when
you made the move to web services. There are a lot of reasons why this
would happen.

1) Web services run across http which is a very slow protocol compared
to other protocols
2) SOAP is appallingly slow, as all data needs to be serialized into
XML. The required XML parsing puts heavy load on the CPU, increases
latency, and lowers throughput.
3) In order to maximize the openness and adoptability of web services,
performance had to sacrificed. Most vendor controlled remoting
technologies are able to take advantage of proprietary compression
techniques. Since no one vendor doesn't control web services, such
custom compression techniques can't be used.

However, even with all of this in mind, 10-15 seconds is still an
extremely high a response time.
Everything being equal, you should probably be getting your responses
back in a matter of seconds. So there seems to be something else
occurring on top of this.

Your last statement about recompilation did give me some thoughts. What
are you observing that make you think that your web services are
recompiling on some calls? Your web services shouldn't be doing that.
What I'm thinking is that your AppDomain might be reloading. After a
certain period of inactivity, the AppDomain running around your web
services unloads. The next call that you make to the web service will
then require this appdomain to reload. This can take a fair number of
seconds. Perhaps this is what you are observing. It may also account
for the 10-15 second response time you are having. Have you tried
making multiple calls in a row via the service? Do all calls take this
long, or is it just the first one? If it's just the first one, then
your issue is probably the appdomain.

I have some other thoughts around your move from web services to COM+.
By itself, COM+ doesn't have any remoting so I assume that either you
are using DCOM or you have this COM+ component located on the same
machine as the code that is calling it. If that's the scenario, then
you really shouldn't be using web services at all. Web services
should be used when calling across server boundaries and shouldn't be
used to call resources on the local box. If you are using DCOM to call
the COM+ component remotely, then ignore that last statement, however
you will definitely find DCOM to be faster than web services.

Hope that gave you something you can use.

Peter Kelcey

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help running a very very very simple code olivier.melcher Java 8 05-12-2008 07:51 PM
very very very long integer shanx__=|;- C Programming 19 10-19-2004 03:55 PM
very very very long integer Abhishek Jha C Programming 4 10-17-2004 08:19 AM
Quick Book file access very very very slow Thomas Reed Computer Support 7 04-09-2004 08:09 PM
very Very VERY dumb Question About The new Set( ) 's Raymond Arthur St. Marie II of III Python 4 07-27-2003 12:09 AM



Advertisments