Web Services Very Slow...Please help

Discussion in 'ASP .Net Web Services' started by amqazi@gmail.com, Nov 22, 2005.

  1. Guest

    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
    , Nov 22, 2005
    #1
    1. Advertising

  2. Peter Kelcey Guest

    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
    Peter Kelcey, Nov 24, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Earl Teigrob
    Replies:
    7
    Views:
    426
    Scott M.
    Feb 16, 2004
  2. Kevin
    Replies:
    1
    Views:
    449
    ~kurt
    May 25, 2007
  3. olivier.melcher

    Help running a very very very simple code

    olivier.melcher, May 12, 2008, in forum: Java
    Replies:
    8
    Views:
    2,271
  4. Alf P. Steinbach /Usenet

    Slow -- VERY slow brain

    Alf P. Steinbach /Usenet, Jun 16, 2011, in forum: C++
    Replies:
    17
    Views:
    509
    Noah Roberts
    Jun 29, 2011
  5. Nick Green
    Replies:
    4
    Views:
    190
    Nick Green
    Nov 18, 2009
Loading...

Share This Page