What happens between Page.PreRender and Page.Unload event?

  • Thread starter Thread starter Mariella Bakker
  • Start date Start date
M

Mariella Bakker

Hi All,

In an ASP.NET project I am trying to improve performance. As it is now there
seems to be a huge bottleneck between the end of the Page.PreRender event
and the beginning of the Page.Unload event. Using a performance analyzing
tool (AqTime 4.9) I am not able to find out what is happening between these
2 events. Can anyone shine some light on what is normally going on between
these 2 events?

Thanks in advance.

Mariella
 
When your page prerender completes, the SaveViewState processing kicks in
and the child controls in the page are are all rendered with their relevent
vewstate data. The type of controls you are rendering may be the cause of
your delays if they are making heavy use of viewstate, and it can grind your
site to dust. In 2 its improved, but it can still be quite heavy.

If I was debugging it I would start by looking here. Perhaps turn off
viewstate for the page and see what the measurement difference was and then
gradually turn it on optionally for each control and measure your results.
Even with viewstate diabled ControlState will still be active, so your app
may well still work as normal.

Setting each controls "EnableViewState" property to "false" is the best
choice if you can use it, or better still disable the whole page.

Some light reading for you.
http://msdn.microsoft.com/msdnmag/issues/04/10/ViewState/default.aspx
 
Back
Top