Finding Bottlenecks

Discussion in 'ASP .Net' started by Nick, Jul 22, 2008.

  1. Nick

    Nick Guest

    Hi there,

    I have a website that functions fine locally, but when published to the
    server it develops a bottleneck during loading some of the pages. Basically
    what happens is the page loads to about 25% then it freezes for anything
    from 10 - 40 seconds, before suddenly loading the rest of the page.

    Of course I understand that this could be down to some code on the page
    locking the thread or suchlike, but I would like to be able to be able to
    find exactly where the bottle neck is occuring. Strangely enough this
    doesn't seem to occur in Firefox although Firefox displays quicker it seems
    to do whatever is holding IE up in the background so you get the illusion of
    it loading quicker.

    Any suggestions on tools or methods for finding bottlenecks in page
    loading? Many thanks in advance for your time and help.

    Nick.
     
    Nick, Jul 22, 2008
    #1
    1. Advertising

  2. Tracing works, if you want something easy to turn on and a bit down and
    dirty. You can also code a trace listener if you want to log these things.

    There are also tools that you can profile your code with, although most of
    them cost at least something. If you have a Team System SKU, there is a
    profile included. Not quite what some of the Enterprise tools out there
    offer, but a good start. DotTrace, from JetBrains, is a nice personal
    profiler (at $199 for personal, not bad pricing either).

    I will have to find the link, but I saw a neat free profiler for the Compact
    Framework, which I think will work with non CE programs. Note to self: have
    to find the link. :)

    --
    Gregory A. Beamer
    MVP, MCP: +I, SE, SD, DBA

    Subscribe to my blog
    http://gregorybeamer.spaces.live.com/lists/feed.rss

    or just read it:
    http://gregorybeamer.spaces.live.com/

    ********************************************
    | Think outside the box! |
    ********************************************
    "Nick" <> wrote in message
    news:...
    > Hi there,
    >
    > I have a website that functions fine locally, but when published to the
    > server it develops a bottleneck during loading some of the pages.
    > Basically what happens is the page loads to about 25% then it freezes for
    > anything from 10 - 40 seconds, before suddenly loading the rest of the
    > page.
    >
    > Of course I understand that this could be down to some code on the page
    > locking the thread or suchlike, but I would like to be able to be able to
    > find exactly where the bottle neck is occuring. Strangely enough this
    > doesn't seem to occur in Firefox although Firefox displays quicker it
    > seems to do whatever is holding IE up in the background so you get the
    > illusion of it loading quicker.
    >
    > Any suggestions on tools or methods for finding bottlenecks in page
    > loading? Many thanks in advance for your time and help.
    >
    > Nick.
    >
     
    Cowboy \(Gregory A. Beamer\), Jul 22, 2008
    #2
    1. Advertising

  3. Hi Nick,

    Regarding on such issue, for locating the bottle neck, it is quite common
    to do some tracing or profiling work upon your web application. for tracing
    , the ASP.NET has already provided trace functionality:

    #ASP.NET Trace
    http://msdn.microsoft.com/en-us/library/y13fw6we(VS.71).aspx

    #Tracing in ASP.NET 2.0
    http://www.beansoftware.com/ASP.NET-Tutorials/Tracing-ASP.NET.aspx

    You can add trace print statement in those page events/functions where you
    put code logic(may block the page) so that in the trace output, you can
    view the time point those event arrive and the next one starts.

    Also, visual studio has provided good profiling tools that can help track
    the performance issues:

    #Analyzing Application Performance using Profiling Tools
    http://msdn.microsoft.com/en-us/library/z9z62c29.aspx

    #How to: Create Performance Session for ASP.NET Applications
    http://msdn.microsoft.com/en-us/library/2s0xxa1d(VS.80).aspx

    the profiling report can give you some info such as what are the most used
    functions, or the most long run functions...

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.

    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/subscriptions/support/default.aspx.
    ==================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.






    --------------------
    >From: "Nick" <>
    >Subject: Finding Bottlenecks
    >Date: Tue, 22 Jul 2008 18:44:40 +0100


    >
    >Hi there,
    >
    > I have a website that functions fine locally, but when published to

    the
    >server it develops a bottleneck during loading some of the pages.

    Basically
    >what happens is the page loads to about 25% then it freezes for anything
    >from 10 - 40 seconds, before suddenly loading the rest of the page.
    >
    > Of course I understand that this could be down to some code on the

    page
    >locking the thread or suchlike, but I would like to be able to be able to
    >find exactly where the bottle neck is occuring. Strangely enough this
    >doesn't seem to occur in Firefox although Firefox displays quicker it

    seems
    >to do whatever is holding IE up in the background so you get the illusion

    of
    >it loading quicker.
    >
    > Any suggestions on tools or methods for finding bottlenecks in page
    >loading? Many thanks in advance for your time and help.
    >
    >Nick.
    >
    >
    >
     
    Steven Cheng [MSFT], Jul 23, 2008
    #3
  4. Nick

    Nick Guest

    Hi Gregory,

    Thanks a million for the information I think I'll give tracing a go and
    see if that shows anything before having a look at the profiling systems.

    Cheers for your time.

    Nick.

    "Cowboy (Gregory A. Beamer)" <> wrote in
    message news:...
    > Tracing works, if you want something easy to turn on and a bit down and
    > dirty. You can also code a trace listener if you want to log these things.
    >
    > There are also tools that you can profile your code with, although most of
    > them cost at least something. If you have a Team System SKU, there is a
    > profile included. Not quite what some of the Enterprise tools out there
    > offer, but a good start. DotTrace, from JetBrains, is a nice personal
    > profiler (at $199 for personal, not bad pricing either).
    >
    > I will have to find the link, but I saw a neat free profiler for the
    > Compact Framework, which I think will work with non CE programs. Note to
    > self: have to find the link. :)
    >
    > --
    > Gregory A. Beamer
    > MVP, MCP: +I, SE, SD, DBA
    >
    > Subscribe to my blog
    > http://gregorybeamer.spaces.live.com/lists/feed.rss
    >
    > or just read it:
    > http://gregorybeamer.spaces.live.com/
    >
    > ********************************************
    > | Think outside the box! |
    > ********************************************
    > "Nick" <> wrote in message
    > news:...
    >> Hi there,
    >>
    >> I have a website that functions fine locally, but when published to
    >> the server it develops a bottleneck during loading some of the pages.
    >> Basically what happens is the page loads to about 25% then it freezes for
    >> anything from 10 - 40 seconds, before suddenly loading the rest of the
    >> page.
    >>
    >> Of course I understand that this could be down to some code on the
    >> page locking the thread or suchlike, but I would like to be able to be
    >> able to find exactly where the bottle neck is occuring. Strangely enough
    >> this doesn't seem to occur in Firefox although Firefox displays quicker
    >> it seems to do whatever is holding IE up in the background so you get the
    >> illusion of it loading quicker.
    >>
    >> Any suggestions on tools or methods for finding bottlenecks in page
    >> loading? Many thanks in advance for your time and help.
    >>
    >> Nick.
    >>

    >
     
    Nick, Jul 23, 2008
    #4
  5. Nick

    Nick Guest

    Hi Steven,

    Thanks for your help and links to articles, they are most helpful.

    Unfortunately I enabled tracing and when I finally got it to work during
    the bottleneck it didn't show the results I was expecting. It said that end
    render fired 0.96 seconds after the first event, that's far from the truth
    as it took roughly 15 seconds for all images to appear and for the progress
    bar to complete.

    I guess that means that I'm going to have to look at profiling as per
    Gregs suggestion.

    Thanks for your time in the matter.

    Nick.

    "Steven Cheng [MSFT]" <> wrote in message
    news:uIQMq$...
    > Hi Nick,
    >
    > Regarding on such issue, for locating the bottle neck, it is quite common
    > to do some tracing or profiling work upon your web application. for
    > tracing
    > , the ASP.NET has already provided trace functionality:
    >
    > #ASP.NET Trace
    > http://msdn.microsoft.com/en-us/library/y13fw6we(VS.71).aspx
    >
    > #Tracing in ASP.NET 2.0
    > http://www.beansoftware.com/ASP.NET-Tutorials/Tracing-ASP.NET.aspx
    >
    > You can add trace print statement in those page events/functions where you
    > put code logic(may block the page) so that in the trace output, you can
    > view the time point those event arrive and the next one starts.
    >
    > Also, visual studio has provided good profiling tools that can help track
    > the performance issues:
    >
    > #Analyzing Application Performance using Profiling Tools
    > http://msdn.microsoft.com/en-us/library/z9z62c29.aspx
    >
    > #How to: Create Performance Session for ASP.NET Applications
    > http://msdn.microsoft.com/en-us/library/2s0xxa1d(VS.80).aspx
    >
    > the profiling report can give you some info such as what are the most used
    > functions, or the most long run functions...
    >
    > Sincerely,
    >
    > Steven Cheng
    >
    > Microsoft MSDN Online Support Lead
    >
    >
    > Delighting our customers is our #1 priority. We welcome your comments and
    > suggestions about how we can improve the support we provide to you. Please
    > feel free to let my manager know what you think of the level of service
    > provided. You can send feedback directly to my manager at:
    > .
    >
    > ==================================================
    > Get notification to my posts through email? Please refer to
    > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    > ications.
    >
    > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    > where an initial response from the community or a Microsoft Support
    > Engineer within 1 business day is acceptable. Please note that each follow
    > up response may take approximately 2 business days as the support
    > professional working with you may need further investigation to reach the
    > most efficient resolution. The offering is not appropriate for situations
    > that require urgent, real-time or phone-based interactions or complex
    > project analysis and dump analysis issues. Issues of this nature are best
    > handled working with a dedicated Microsoft Support Engineer by contacting
    > Microsoft Customer Support Services (CSS) at
    > http://msdn.microsoft.com/subscriptions/support/default.aspx.
    > ==================================================
    > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    >
    >
    >
    >
    >
    >
    > --------------------
    >>From: "Nick" <>
    >>Subject: Finding Bottlenecks
    >>Date: Tue, 22 Jul 2008 18:44:40 +0100

    >
    >>
    >>Hi there,
    >>
    >> I have a website that functions fine locally, but when published to

    > the
    >>server it develops a bottleneck during loading some of the pages.

    > Basically
    >>what happens is the page loads to about 25% then it freezes for anything
    >>from 10 - 40 seconds, before suddenly loading the rest of the page.
    >>
    >> Of course I understand that this could be down to some code on the

    > page
    >>locking the thread or suchlike, but I would like to be able to be able to
    >>find exactly where the bottle neck is occuring. Strangely enough this
    >>doesn't seem to occur in Firefox although Firefox displays quicker it

    > seems
    >>to do whatever is holding IE up in the background so you get the illusion

    > of
    >>it loading quicker.
    >>
    >> Any suggestions on tools or methods for finding bottlenecks in page
    >>loading? Many thanks in advance for your time and help.
    >>
    >>Nick.
    >>
    >>
    >>

    >
     
    Nick, Jul 23, 2008
    #5
  6. Nick

    Nick Guest

    Hi Patrice,

    I think you are right, I have run profiling on the effected part and cut
    down as much loading time as I possible could which has shaved a couple of
    seconds off the loading time, but the delay is still there.

    I'm not quite sure if it would be classed as a complex section though
    tbh, I mean it's styled DIV with an unordered list UL inside which get
    styled into buttons through the containing DIVs style. So pretty basic
    really, but what currently happens is it gets to like the 2nd or 3rd button
    then pauses for x seconds before resuming with page rendering.

    Although with that said, one of the items does contain a few variables,
    i.e. <%$AppSettings:blabla %>, so I'm not sure if that could be slowing
    things down as it's on the 4th button. I'll see what changing it does...

    Thanks for your time and feedback, I'll get to the bottom of this
    eventually.

    Nick.

    "Patrice" <http://www.chez.com/scribe/> wrote in message
    news:...
    > It could be just that this is a client side issue (I thought about that
    > also when seeing that you said it was quicker with FF).
    >
    > Of course with ASP.NET trace enabled you are just seeing server side
    > processing. My guess would be that you could have a quite complex nested
    > structure for your page that takes a fair amount of time to layout in
    > IE...
    >
    > --
    > Patrice
    >
    > "Nick" <> a écrit dans le message de groupe de discussion :
    > ...
    >> Hi Steven,
    >>
    >> Thanks for your help and links to articles, they are most helpful.
    >>
    >> Unfortunately I enabled tracing and when I finally got it to work
    >> during the bottleneck it didn't show the results I was expecting. It
    >> said that end render fired 0.96 seconds after the first event, that's far
    >> from the truth as it took roughly 15 seconds for all images to appear and
    >> for the progress bar to complete.
    >>
    >> I guess that means that I'm going to have to look at profiling as per
    >> Gregs suggestion.
    >>
    >> Thanks for your time in the matter.
    >>
    >> Nick.
    >>
    >>[cut]>

    >
    >
     
    Nick, Jul 23, 2008
    #6
  7. Thanks for the reply Nick,

    yes, as you've profiled, the server-side processing takes much less time
    than what you actually seen(from the first event to the page display at
    client). Then, the problem is likely occuring during the output
    rendering/transfering from server to the client browser. Generally, you
    can first check page size to make sure it is reasonable and not too
    large(such as contains large viewstate). Then, we need to take further look
    into the behavior, maybe some network trace will be also necessary.

    Sincerely,

    Steven Cheng
    Microsoft MSDN Online Support Lead


    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.
    ==================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------
    >From: "Nick" <>
    >References: <>

    <uIQMq$>
    <>
    <>
    >Subject: Re: Finding Bottlenecks
    >Date: Wed, 23 Jul 2008 14:07:06 +0100


    >
    >Hi Patrice,
    >
    > I think you are right, I have run profiling on the effected part and

    cut
    >down as much loading time as I possible could which has shaved a couple of
    >seconds off the loading time, but the delay is still there.
    >
    > I'm not quite sure if it would be classed as a complex section though
    >tbh, I mean it's styled DIV with an unordered list UL inside which get
    >styled into buttons through the containing DIVs style. So pretty basic
    >really, but what currently happens is it gets to like the 2nd or 3rd

    button
    >then pauses for x seconds before resuming with page rendering.
    >
    > Although with that said, one of the items does contain a few

    variables,
    >i.e. <%$AppSettings:blabla %>, so I'm not sure if that could be slowing
    >things down as it's on the 4th button. I'll see what changing it does...
    >
    > Thanks for your time and feedback, I'll get to the bottom of this
    >eventually.
    >
    >Nick.
    >
    >"Patrice" <http://www.chez.com/scribe/> wrote in message
    >news:...
    >> It could be just that this is a client side issue (I thought about that
    >> also when seeing that you said it was quicker with FF).
    >>
    >> Of course with ASP.NET trace enabled you are just seeing server side
    >> processing. My guess would be that you could have a quite complex nested
    >> structure for your page that takes a fair amount of time to layout in
    >> IE...
    >>
    >> --
    >> Patrice
    >>
    >> "Nick" <> a écrit dans le message de groupe de discussion :
    >> ...
    >>> Hi Steven,
    >>>
    >>> Thanks for your help and links to articles, they are most helpful.
    >>>
    >>> Unfortunately I enabled tracing and when I finally got it to work
    >>> during the bottleneck it didn't show the results I was expecting. It
    >>> said that end render fired 0.96 seconds after the first event, that's

    far
    >>> from the truth as it took roughly 15 seconds for all images to appear

    and
    >>> for the progress bar to complete.
    >>>
    >>> I guess that means that I'm going to have to look at profiling as

    per
    >>> Gregs suggestion.
    >>>
    >>> Thanks for your time in the matter.
    >>>
    >>> Nick.
    >>>
    >>>[cut]>

    >>
    >>

    >
    >
    >
     
    Steven Cheng [MSFT], Jul 24, 2008
    #7
    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. Stephen Coe

    Finding maximum clock rate

    Stephen Coe, May 16, 2004, in forum: VHDL
    Replies:
    0
    Views:
    614
    Stephen Coe
    May 16, 2004
  2. Colby L. Canutt

    Need help finding LRM Draft

    Colby L. Canutt, Sep 3, 2004, in forum: VHDL
    Replies:
    0
    Views:
    462
    Colby L. Canutt
    Sep 3, 2004
  3. rootz anabo
    Replies:
    3
    Views:
    558
    sarsizz
    Jan 2, 2005
  4. Jeff
    Replies:
    1
    Views:
    358
    Robbe Morris [C# MVP]
    Dec 20, 2005
  5. Jeremy

    Webservices Basic Authentication Bottlenecks

    Jeremy, Nov 3, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    122
    Jeremy
    Nov 3, 2004
Loading...

Share This Page