views:

84

answers:

3

How would you troubleshoot a page that is rendering slowly in ASP.NET?

This issue is happening on only specific pages with a few user controls. Other pages work fine. Tracing has clarified that the issue is happening between "Begin Render" and "End Render".

+3  A: 

Have you tried adding caching to your user controls or do they have to be permanently dynamic?

EDIT

If the render is causing pain then it suggests that you have heavy controls loading.

You could try to load the pages without the controls and then use ajax to pull in the heavy controls after the page has loaded - using the appropriate loading graphics. Jquery could be used to asynchronously load the heavier controls whilst allowing the user to see the page very quickly.

EDIT

amelvin
The data is permanently dynamic. Besides, it will still have that initial "slowness" and the question here is to find out a detailed output about the "slow" control.
Rahul Soni
@Rahul Use ajax to asynchronously pull in the heavier controls.
amelvin
@amelvin, although AJAX could make the appearance of the page "faster", inherently it wouldn't be faster. I will post the answer separately.
Rahul Soni
@Rahul why have you downvoted this answer?
amelvin
Sorry amelvin. I had to downvote, because using AJAX to pull the heavier controls is not really a resolution. It is just a workaround and it doesn't really tell you about the culprit control. Right? Please check my answer. http://www.dotnetscraps.com/dotnetscraps/post/How-to-troubleshoot-issues-with-Page-Rendering-in-ASPNET.aspx
Rahul Soni
@Rahul http://meta.stackoverflow.com/questions/16236/when-should-correct-answers-get-downvoted
amelvin
@amelvin... Ahh... am sorry man... I am a new user of SO and wasn't aware of this. I sincerely thank you for redirecting me to the link. I wanted to undo that downvote, but it wouldn't allow me to, unless you edit (I am guessing... the error message is... "Vote too old to be changed, unless this answer is edited".If you edit, I think I can undo the vote.
Rahul Soni
@Rahul No worries. The http://meta.stackoverflow.com is packed with thoughts on etiquette and how to use the site - worth a browse.
amelvin
@amelvin. Sure! I just undid the downvote :)
Rahul Soni
+2  A: 

Thanks for your responses! Check this link out... IMHO, this could be a way in fixing the issue permanently.

http://www.dotnetscraps.com/dotnetscraps/post/How-to-troubleshoot-issues-with-Page-Rendering-in-ASPNET.aspx

HTH

Rahul Soni
That is a great post. Thanks,
Chris Lively
+1  A: 

Use a .Net Profiler.

It's the only conclusive way to pinpoint your performance issues.

kervin