Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help locating a problem...

Status
Not open for further replies.

steverbs

Programmer
Jul 17, 2003
253
GB
Hi all.

I'm trying to locate a problem in a web app that, under certain circumstances (such as when accessing the app when logged in) is causing very slow execution times. I went ahead and placed timers for the main page events for each of the controls that load during a prticular request. I have found that the delay is happening just before Page_PreRender(). Here are two examples of the timings that locate the problem area within the request:

ProductList.ascx Page_Load() End: 17/03/2005 13:29:34:921 ***
ShopFront.aspx Page_PreRender() Start: 17/03/2005 13:29:47:498 ***

ProductsMain.ascx pageLoad() End: 17/03/2005 13:16:08:107 ***
ShopFront.aspx Page_PreRender() Start: 17/03/2005 13:16:21:294 ***

Now, as far as I am aware, the only two calls that could be made between the Control's Page_Load event and the Page's Page_PreRender events are Page_EnsureChildControls and Page_CreateChildControls. Any idea as to how I can find out what could be causing a problem here? This is driving me nuts!

Thank you.

Stephen.
 
EnsureChildControls won't be a problem. However, CreateChildControls is a hefty chunk of the cycle - it's where child controls are actually instantiated etc. I'd imagine there's some slow-running code in your controls and/or pages - do you have any database calls? Any dynamic image creation? Any heavy data processing?
 
Thank you for your help, Dace.

I will have a few DB calls, however, I have timed every event, which contains my code, that is raised during a page request and it all runs just fine. It seeme like there is a part of the request (probably CreateChildControls) that I can't get access to. Is there any way of viewing what happens during this event?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top