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

  • Thread starter Mariella Bakker
  • 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
 
J

John Timney \( MVP \)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top