By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,710 Members | 1,601 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,710 IT Pros & Developers. It's quick & easy.

slow page rendering (prerender event)

P: n/a
Hi, I'm hoping someone can lend me a hand....I've got a .NET Web app
running on Windows 2000 IIS 5.0 linking to a SQL Server 2000 database.
When the database is located on the same server as the web app, the
pages render quickly - however, when I run the app with the database
on its own server, the page rendering takes anywhere from 5-8 seconds,
and when I enable tracing on the application, it appears to be the
begin prerender event that takes up the most time (every other event
is taking in the 0.00XX second range).

Does anyone know what happens in this event and what might be causing
the slow down? Do db connections get made in this event, because that
might explain why moving the db off to another server causes a
performance hit.

Thanks
Nov 18 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Did you put database code in that event? If you didn't put it there, then
there is no way for it to get there on its own.

"wardy" <wa*******@yahoo.com> wrote in message
news:2c*************************@posting.google.co m...
Hi, I'm hoping someone can lend me a hand....I've got a .NET Web app
running on Windows 2000 IIS 5.0 linking to a SQL Server 2000 database.
When the database is located on the same server as the web app, the
pages render quickly - however, when I run the app with the database
on its own server, the page rendering takes anywhere from 5-8 seconds,
and when I enable tracing on the application, it appears to be the
begin prerender event that takes up the most time (every other event
is taking in the 0.00XX second range).

Does anyone know what happens in this event and what might be causing
the slow down? Do db connections get made in this event, because that
might explain why moving the db off to another server causes a
performance hit.

Thanks

Nov 18 '05 #2

P: n/a
"wardy" <wa*******@yahoo.com> wrote in message
news:2c*************************@posting.google.co m...
Hi, I'm hoping someone can lend me a hand....I've got a .NET Web app
running on Windows 2000 IIS 5.0 linking to a SQL Server 2000 database.
When the database is located on the same server as the web app, the
pages render quickly - however, when I run the app with the database
on its own server, the page rendering takes anywhere from 5-8 seconds,
and when I enable tracing on the application, it appears to be the
begin prerender event that takes up the most time (every other event
is taking in the 0.00XX second range).


There isn't actually a "begin prerender" event, only a PreRender event.

Could you post the part of the trace where you feel the delay is taking
place?
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #3

P: n/a
Thanks for the replies....I don't have any database connections defined
in the pre-render event of any of the pages - all of the database
connections take place in objects, not the aspx pages.

As for the trace, I have posted it below....notice the prerender takes
3.3 secs...This process only takes 0.0xx secs when the db is on the same
server - this may possibly a network issue also, but I am just trying to
eliminate coding issues.

Thanks again

-------------------------------------
Request Details
Session Id: 0a4yll55iwkrt3byoon3c245 Request Type: GET
Time of Request: 16/06/2004 6:47:02 PM Status Code: 200
Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)
Trace Information
Category Message From First(s) From Last(s)
aspx.page Begin Init
aspx.page End Init 0.000175 0.000175
aspx.page Begin PreRender 3.300890 3.300715
aspx.page End PreRender 3.300977 0.000087
aspx.page Begin SaveViewState 3.302034 0.001057
aspx.page End SaveViewState 3.302086 0.000052
aspx.page Begin Render 3.302121 0.000035
aspx.page End Render 3.448888 0.146767
Control Tree
Control Id Type Render Size Bytes (including children) Viewstate Size
Bytes (excluding children)
__PAGE ASP.iCat_aspx 9159 0
literalTitle System.Web.UI.WebControls.Literal 26 64
litHeader System.Web.UI.WebControls.Literal 536 780
litLeftMenu System.Web.UI.WebControls.Literal 571 844
litMain System.Web.UI.WebControls.Literal 6673 9508
litFooter System.Web.UI.WebControls.Literal 339 500
Session state
Session Key Type Value
crumb System.Boolean True
cookiesEnabled System.Boolean True

-----------------------------------------------------
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #4

P: n/a
"John Ward" <wa*******@yahoo.com> wrote in message
news:%2********************@TK2MSFTNGP11.phx.gbl.. .
Thanks for the replies....I don't have any database connections defined
in the pre-render event of any of the pages - all of the database
connections take place in objects, not the aspx pages.

As for the trace, I have posted it below....notice the prerender takes
3.3 secs...This process only takes 0.0xx secs when the db is on the same
server - this may possibly a network issue also, but I am just trying to
eliminate coding issues.

Thanks again

-------------------------------------
Request Details
Session Id: 0a4yll55iwkrt3byoon3c245 Request Type: GET
Time of Request: 16/06/2004 6:47:02 PM Status Code: 200
Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)
Trace Information
Category Message From First(s) From Last(s)
aspx.page Begin Init
aspx.page End Init 0.000175 0.000175
aspx.page Begin PreRender 3.300890 3.300715


No. This shows that the time between "End Init" and "Begin PreRender" is 3.3
seconds.

You should override each of the various methods like OnLoad and add a
Trace.Write to each (be sure to call the base class method at the end). This
will show you where the time is being spent. At a guess, it's in Page_Load.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #5

P: n/a
Hi John, thanks for the suggestion....I'm pretty much a newbie when it
comes to using the trace features. What do you mean by reference the
base class method at the end? Could you provide me an example of how
the code would look to do this?

Thanks again...
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #6

P: n/a
Hi John, thanks for the suggestion....I'm pretty much a newbie when it
comes to using the trace features. What do you mean by reference the
base class method at the end? Could you provide me an example of how
the code would look to do this?

Thanks again...
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #7

P: n/a
"John Ward" <wa*******@yahoo.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi John, thanks for the suggestion....I'm pretty much a newbie when it
comes to using the trace features. What do you mean by reference the
base class method at the end? Could you provide me an example of how
the code would look to do this?


I forgot whether you use C# or VB.NET, so here's both:

protected override void OnLoad(EventArgs e)
{
Trace.Write(String.Format("OnLoad started at {0}", DateTime.Now);
base.OnLoad(e);
Trace.Write(String.Format("OnLoad ended at {0}", DateTime.Now);
}

Protected Overrides Sub OnLoad(e As EventArgs)
Trace.Write(String.Format("OnLoad started at {0}", DateTime.Now)
MyBase.OnLoad(e)
Trace.Write(String.Format("OnLoad ended at {0}", DateTime.Now)
End Sub
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.