validity of a statement from a book

Discussion in 'ASP .Net' started by parez, Oct 18, 2008.

  1. parez

    parez Guest

    "Asynchronous Web pages can improve performance in scenarios where the
    thread pool might be limiting performance."

    The asynchronous stuff is done using IHttpAsyncHandler. Wouldnt it use
    the same threads from the thread pool?
     
    parez, Oct 18, 2008
    #1
    1. Advertising

  2. parez

    bruce barker Guest

    yes and no.

    whether your page can benefit from being written as asynchronous depends
    on how many i/o, network or database calls the page makes. a typical
    database call may take 50-100ms. during this time, the request thread is
    tied up in an i/o wait. if the asynchronous model is used, during this
    wait, the thread could be used to process another request that is not in
    an i/o state.

    the trick to understand is that the page processing event model allows
    switching the request processing thread at each page event (this was
    true in asp.net 1.0). asynchronous i/o was dangerous in this model, as
    the completion notification of the asynchronous event happens on the
    thread that started it. this was a problem if asp switched the
    processing thread during the request before completion of the
    asynchronous request.

    with the new model, there is an page cycle event where all asynchronous
    requests are started, and a page cycle event that called when all the
    requests have completed.

    due to thread switching during a request this is still the only
    supported way to use asynchronous requests. this is also why thread
    local storage will not work, or any thread context changes made during
    processing of a page request.


    -- bruce (sqlwork.com)


    parez wrote:
    > "Asynchronous Web pages can improve performance in scenarios where the
    > thread pool might be limiting performance."
    >
    > The asynchronous stuff is done using IHttpAsyncHandler. Wouldnt it use
    > the same threads from the thread pool?
     
    bruce barker, Oct 18, 2008
    #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. Martin Burger
    Replies:
    3
    Views:
    554
    Roland
    Jun 30, 2005
  2. Zhou Lei

    XML 2 XHTML validity...

    Zhou Lei, Mar 3, 2005, in forum: XML
    Replies:
    2
    Views:
    463
    Zhou Lei
    Mar 5, 2005
  3. Jimmy zhang

    comment on the validity of xpath

    Jimmy zhang, Jul 26, 2005, in forum: XML
    Replies:
    1
    Views:
    330
  4. WT
    Replies:
    4
    Views:
    1,687
    Steven Cheng[MSFT]
    Apr 28, 2006
  5. Marcus Alanen
    Replies:
    1
    Views:
    329
    Alf P. Steinbach
    Sep 7, 2003
Loading...

Share This Page