Page Perfomance Problem

Posted by Vuyiswamb under ASP.NET on 2/9/2010 | Views : 826 | Status : [Member] [MVP] [Administrator] | Replies : 2
Good Day All

I have a page that has lots of Panels and am doing some hide and show there. Sometimes i show the Gridview and when i hide the panel that has gridview loaded with large some of Data, the page takes time to hide that panel. i have image button that does the following

     Panel1.Visible = !Panel1.Visible;
Panel2.Visible = !Panel2.Visible;
Panel2.Enabled = !Panel2.Enabled;
Panel3.Visible = false;
ImageButton3.Visible = true;
ImageButton2.Visible = false;
MultiViewSelection.ActiveViewIndex = 0;
rdbtnlstOrderVenuesBy.Visible = false;
rdbtnlstToggleBy.Visible = false;
lblOrderBy.Visible = false;
lblToggleBy.Visible = false;

i cant do this on the client site because there are some of the panels and control that are not "visible" true initially.

what could affect the performance in this situation

Kind Regards

Vuyiswa Maseko

Thank you for posting at Dotnetfunda


Posted by: Abhi2434 on: 2/9/2010 [Member] [Microsoft_MVP] [MVP] Silver

I think the performance depends on how you load the controls.
Say you dont want the control to be visible, you might not load the control either, and when it is required, you may load them.

Other than that, you might also spawn a thread for those controls that are visible = false and fetch the data, thus you leverage out the time of data load a little when the visible is set to true for those controls.

I would recommend to load only the part that is visible, and unload when its visibility hidden.

Loading lots of controls causes issues in case of Windows Programs as well. Also large no of database hits should be controlled.

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nishithraj on: 2/11/2010 [Member] Bronze

In this case you can try with the style property display none instead of making visible false.

You can set even through code behind or from client side, as you require...

Mark this as answer, if it is.....

With regards
Nishithraj Narayanan

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response