Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2005

Tip: Looking for answers? Try searching our database.

Web Services Very Slow...Please help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
amqazi@gmail.com - 22 Nov 2005 01:46 GMT
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
Peter Kelcey - 24 Nov 2005 04:52 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.