Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

time to render table

0 views
Skip to first unread message

oldyork90

unread,
May 16, 2008, 3:58:56 PM5/16/08
to
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

Thomas 'PointedEars' Lahn

unread,
May 16, 2008, 4:46:36 PM5/16/08
to
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

oldyork90

unread,
May 16, 2008, 5:04:54 PM5/16/08
to
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

0 new messages