473,750 Members | 2,253 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

slow page rendering (prerender event)

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
7 4943
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*******@yaho o.com> wrote in message
news:2c******** *************** **@posting.goog le.com...
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
"wardy" <wa*******@yaho o.com> wrote in message
news:2c******** *************** **@posting.goog le.com...
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
johnwsaundersii i at hotmail
Nov 18 '05 #3
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: 0a4yll55iwkrt3b yoon3c245 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.W ebControls.Lite ral 26 64
litHeader System.Web.UI.W ebControls.Lite ral 536 780
litLeftMenu System.Web.UI.W ebControls.Lite ral 571 844
litMain System.Web.UI.W ebControls.Lite ral 6673 9508
litFooter System.Web.UI.W ebControls.Lite ral 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
"John Ward" <wa*******@yaho o.com> wrote in message
news:%2******** ************@TK 2MSFTNGP11.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: 0a4yll55iwkrt3b yoon3c245 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
johnwsaundersii i at hotmail
Nov 18 '05 #5
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
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
"John Ward" <wa*******@yaho o.com> wrote in message
news:%2******** *******@tk2msft ngp13.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(EventArg s e)
{
Trace.Write(Str ing.Format("OnL oad started at {0}", DateTime.Now);
base.OnLoad(e);
Trace.Write(Str ing.Format("OnL oad ended at {0}", DateTime.Now);
}

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1835
by: Alireza Ziai | last post by:
I have problem with prerender event in my page I dont know why prerender event occurs immediatley after Load event , I have same problem with Unload event too ,is it a problem with framework or sth ?
0
1568
by: wardy | last post by:
I've got a .NET web application running in .NET 1.1 on IIS 5 with SQL Server 2000. I've noticed that at times the page rendering is delayed, and when I run the trace I see that the begin prerender event takes anywhere from 0.2-5.0 seconds, whereas all the other events take in the range of 0.000XX seconds. Does anyone know what is happening in the begin prerender event that might be causing this delay (as a note, I've found that when I...
1
1923
by: steven.varr | last post by:
Hi, The system I am working on handles web page navigation in the following fashion: When a button is clicked on a web page a post-back is triggered. The page_load event occurs as usual with the the button click event occurring afterwards. The button click event then runs the code to forward the user to the next web page. My problem is that the page_load event runs a whole load of code that is unecessary when the button click event is...
3
8116
by: Matt Jensen | last post by:
Howdy all - and seasons greetings Just wondering, I've recently discovered the PreRender event for .NET (both for the page and for controls), which seems like a life saver for doing page data loads that need to occur AFTER event handlers have fired, as well as after page load and postback. Is this good, bad or common practice? example I've got a repeater on the page, and in the header of the repeater I've got
3
9667
by: John Scott | last post by:
Hey I've got an odd problem here. I have two user controls on a single page. Here is the flow of my page Page(OnLoad) UC1(OnPreRender) UC2(OnPreRender) Page(ButtonClick) UC1(OnPreRender) UC2....NOTHING
2
2065
by: Joe | last post by:
Hello All: I have been bitten a few times lately as I've tried to implement functionality in the Page_PreRender event. So here is my question: for what purpose do you use the PreRender event? How do you decide whe to use the PreRender event vs the Unload event? Any respnse will be welcome.
3
2198
by: UJ | last post by:
I had somebody (who was an idiot) tell me that tables are slow in rendering? That you shouldn't do things like tables inside of tables. Is that true? I think she didn't know what she was talking about but I just wanted to confirm with people. TIA - J.
2
2978
by: =?Utf-8?B?WWFua2VlIEltcGVyaWFsaXN0IERvZw==?= | last post by:
i'm not sure how the preRender event gets handled. if i have a function: protected void tbPasswordPreRender(object sender, EventArgs e) { tbPswd1.Attributes = tbPswd1.Text; tbPswd2.Attributes = tbPswd2.Text; } and set the two text boxes Prerender event to this single function will it fire twice?
0
1869
by: tshad | last post by:
In VS 2008, I have 2 pages, one aspx page and one ascx page. The PreRender event is not firing on the Contol page. The aspx page starts out: <%@ Page Language="VB" AutoEventWireup="true" Trace="true" CodeFile="TakeSurveyTest.aspx.vb" Inherits="TakeSurveyTest" %> And the ascx page starts out:
0
8836
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9575
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9394
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9256
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4885
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3322
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.