I am rendering a small table(maybe 10-12 cells) which is updated constantly. I want it to be quick. Chrome does the work very fast, but i am having problems on Firefox/IE. Any suggestions for faster rendering? Thanks
Render the full table at once (create the full HTML for the table and insert it into the DOM, don't insert cells/rows while looping through the data). Also, generating tags for the columns should help (even more if you specify the width for each column).
Interesting acticle that I think can be quite relevant (though a bit indirectly) to the question: http://www.hotdesign.com/seybold/
I got it from an answer to my own question:
One way to improve rendering is to use the thead/tfooter tags. These need to occur before your tbody tag which contains the main content of your table.
<table>
<thead></thead>
<tfoot></tfoot>
<tbody></tbody>
</table>
This way, the browser knows how big your table is before it renders it, which should spped up loading.
You can check what really happened on the page with help of Timeline panel of Chrome or Safari Dev-Tools (Ctrl-Shift-I for Windows or Cmd-Alt-I for Mac). That information may give you a tip for page scripts optimization. Usually the same set of events will happen in any browser. As example if your javascript dynamically insert DOM nodes then you will see multiple Layout/Paint events.
You will get more Timeline info with the dev-channel version of Chrome but it might be unstable a bit.
Unfortunately I didn't find such instrument in FireBug if you know something like that for Firefox please let me know.