locked
Pages Slow To Load RRS feed

  • Question

  • User1442101371 posted

    I use Chrome as my browser and in the code behind I have a few calls to SQL Queries.  I used StopWatch class to determine the time it takes to run the SQL Queries and one was 12 seconds, and the other was 4, so I know that is not the slowdown.

    What should I do to find out what is causing my pages to have a delay in load time?  This is an internal web forms IIS hosted app, no internet access.

    Monday, December 28, 2015 9:02 PM

All replies

  • User753101303 posted

    Hi,

    Adn the total time is? 12+4 seconds seems quite slow to me. You could also use F12 to see first where it happens. For example a known issue for beginners is to show a huge HTML page (thousands of rows for example) in which case most of the time is spent in downloading and rendering this huge HTML file.

    Monday, December 28, 2015 9:42 PM
  • User1442101371 posted

    PatriceSc

    Hi,

    Adn the total time is? 12+4 seconds seems quite slow to me. You could also use F12 to see first where it happens. For example a known issue for beginners is to show a huge HTML page (thousands of rows for example) in which case most of the time is spent in downloading and rendering this huge HTML file.

    As the page is loading press F12 to see the order of execution of events?

    When I press F12 when the page is loading all that I saw was /CSS/Styles.css

    Does that mean the CSS I am running is creating the page load lag?

    Also, F12 shows that 5 different JavaScript functions are run on page load

    Monday, December 28, 2015 9:47 PM
  • User753101303 posted

    I meant F12 browser side and you should have then a "Network" tab that allows to check each http request done by the browser and the corresponding response. See for example https://developers.google.com/web/tools/chrome-devtools/ and choose NETWORK (you have that as well in IE or FF).

    See the size and time. For now I suspect that you could generate a huge HTML page which could cause most of the time being spent in downloading this huge HTML response. Else it should at least show where you should focus.

    Monday, December 28, 2015 10:17 PM
  • User1442101371 posted

    I have 4.2 minutes spent on TTFB is what is displayed under the Network.  What way would I further diagnose what is causing this?

    You mentioned possibly my HTML twice, how would I diagnose those times?

    Tuesday, December 29, 2015 12:17 AM
  • User-166373564 posted

    Hi,

    When an ASP.NET page is requested for the first time, an instance of the Page class is dynamically compiled.

    The common language runtime just-in-time (JIT) compiles ASP.NET managed page code to the native code of the processing server at run time.

    https://msdn.microsoft.com/en-us/library/aa719563.aspx

    You could try the following.

    <compilation debug="false"/>

    https://blogs.msdn.microsoft.com/tess/2006/04/12/asp-net-memory-if-your-application-is-in-production-then-why-is-debugtrue/

    Regards,

    Angie

    Thursday, January 7, 2016 9:24 AM
  • User753101303 posted

    First what is the size of the HTML page? My first though was to rendering thousand of rows creating a huge HTML page that just take some time to be downloaded and rendered.

    You have that as well in the network tab or on the page OI believe that iif you choose properties in the context menu most browsers should give the size of the page.

    Thursday, January 7, 2016 9:56 AM