0

I have an ASP.Net app, which uses a SQL Server database on a hosted plan.

When I click a button to go to a new screen there is a long pause before the page loads.

Using Chrome, I see this:

enter image description here

What does 'Waiting' indicate as the issue? Is it a problem where, on the server, it's taking too long to get the data? Slow query maybe? Any way I can debug this?

The line which shows this pause is actually the page on which the 'Redirect' happens, after a postback.

Craig
  • 18,074
  • 38
  • 147
  • 248

1 Answers1

2

As far as I know, Chrome will only tell you which resources are being loaded and time taken for each. To debug this, you need a tool like Antz Profiler, which will help you find bottlenecks in the C# code. It will highlight which lines are taking the longest, in a hierarchical fashion, so you can drill down to the culprit.

If you find that it's a line calling your database, then you can use Query Analyser in SSMS to investigate the SQL query. If you post the code for the page_load() event, I will update the answer with anything that looks obvious.

Other things to look out for will be the resources the page is loading, images, javascript files, external libraries etc. If you have a lot of Javascript files, make sure they are the .min version, or if the files are custom, maybe consider adding the code in one file, and minifying the production version. Make sure any images are small in size, as this will take up bandwidth.

take a look at Tips for authoring fast-loading HTML pages for some other examples.

You'll also find some good tips here How to decrease the page load time in ASP.NET application?

Community
  • 1
  • 1
Christian Phillips
  • 18,399
  • 8
  • 53
  • 82