473,385 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

time to render table

Is there a way I can time browser drawing/rendering time for a given
element. I have a huge table. I have it's name. We'd like to
experiment with different combinations to speed things along. Can we
capture the time somehow?

Thanks
Jun 27 '08 #1
2 1596
oldyork90 wrote:
Is there a way I can time browser drawing/rendering time for a given
element. I have a huge table. I have it's name.
`table' elements cannot have a name as the `table' element type does not
have a `name' attribute. They can have an ID as the element type has an
`id' attribute. Anything else is invalid markup, see http://validator.w3.org/
We'd like to experiment with different combinations to speed things
along.
Make your table much shorter.
Can we capture the time somehow?
Yes, you can.

<script type="text/javascript">
var start = new Date();
</script>

<!-- markup -->

<script type="text/javascript">
document.write("<p>Rendering of the markup before took about "
+ (new Date() - start) + "&nbsp;ms.<\/p>");
</script>

should suffice. You may also use window.alert() instead of document.write().
PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
Jun 27 '08 #2
On May 16, 3:46 pm, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
oldyork90 wrote:
Is there a way I can time browser drawing/rendering time for a given
element. I have a huge table. I have it's name.

`table' elements cannot have a name as the `table' element type does not
have a `name' attribute. They can have an ID as the element type has an
`id' attribute. Anything else is invalid markup, seehttp://validator.w3.org/
We'd like to experiment with different combinations to speed things
along.

Make your table much shorter.
Can we capture the time somehow?

Yes, you can.

<script type="text/javascript">
var start = new Date();
</script>

<!-- markup -->

<script type="text/javascript">
document.write("<p>Rendering of the markup before took about "
+ (new Date() - start) + "&nbsp;ms.<\/p>");
</script>

should suffice. You may also use window.alert() instead of document.write().

PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
Thank you pointed ears!
oy
Jun 27 '08 #3

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

Similar topics

0
by: jb_in_marietta | last post by:
All, I have written a very simple custom composite control that includes a control of type System.Web.UI.WebControls.Table. The control renders fine in run time, but for some reason, it does...
0
by: Cabral | last post by:
Hi I creating object in run-time and render the webform, but when I want drop this object I donĀ“t render the page without this object, but in next autopostback of the webform is render correct ...
4
by: Zuel | last post by:
Hi Folks. So I have a small problem. My DoPostBack function is not writen to the HTML page nor are the asp:buttons calling the DoPostBack. My Goal is to create a totaly dynamic web page where...
2
by: Tony | last post by:
I have a very peculiar problem that I am hoping someone can point me in the right direction on. I have an asp.net page that displays a virtual paycheck to a user. One asp.net page calls another...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
0
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...

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.