C# .NET - page load takes time by using panel on aspx page

Asked By deepi singh on 09-Aug-11 11:13 AM
is there any other control other than panel......to load page fastly
Devil Scorpio replied to deepi singh on 09-Aug-11 11:22 AM
Hi deepi,

Steps to be taken to improve the performance if the page takes time to load

It could be because of several reasons. Viewstate or some DB function you are calling in that page.

Enable tracing on the page and see which handler is taking long time to execute. You could enable to tracing just on that page or in the web.config as follows

<configuration>
  <system.web>
   <trace enabled="true" pageOutput="true" traceMode="SortByTime" requestLimit="40" />
  </system.web>
</configuration>


here is a nice article from msdn for peformance tips

http://msdn.microsoft.com/en-us/magazine/cc163854.aspx

additionaly from unwanted namspaces to unwanted storage of viewstates during postbacks will affect you website perfomance.

you have to look into each process in your code and need to anlyase its cost to the loading of the page....avoid gridviews

datasets etc etc lots of steps are there for improving your site speed.
Riley K replied to deepi singh on 09-Aug-11 11:55 AM
  
 The long time is not because of the Panel, it is with the code that you have written

 Unless you post some more info about what activity you are doing in Page load like 
 fetching more records or any database operation Its hard to tell why it is taking so long

if there are any heavy database operations try to fine tune your database with proper 
indexes first

Also suggest you put a break-point in you main page's load event, and run it in debug mode on your developer machine. Could be you are calling some long running code (like database reads) serveral times due to post backs occuring.

Also Use tools like Fiddler CLR profiler to analyze the statistics

You can also use inbuilt feature of Visual Studio That is Performance analysis which gives a detail report of 
each method taking how much time to execute


Try this and let me know

Jitendra Faye replied to deepi singh on 10-Aug-11 12:08 AM

here is a nice article from msdn for peformance tips

http://msdn.microsoft.com/en-us/magazine/cc163854.aspx

additionaly from unwanted namspaces to unwanted storage of viewstates during postbacks will affect you website perfomance.

you have to look into each process in your code and need to anlyase its cost to the loading of the page....avoid gridviews

datasets etc etc lots of steps are there for improving your site speed...

hope this help...