all groups > dotnet jscript > april 2004 >
You're in the

dotnet jscript

group:

Table Generation



Table Generation Sam Nabialek
4/26/2004 9:54:10 AM
dotnet jscript:
Any ideas why table generation is so much slower in IE using JScript
than in Netscape using the same code and data. I'm trying to generate
a long table from a dataset. My main target is IE but I always test with
Netscape/Mozilla as well. The table is 6 columns wide by 1500 rows.
it takes almost 7 minutes to generate using IE but only 10 seconds
under netscape. I'm creating the table populating it and then adding it to
the document. I tried adding it and then populating it, this took about
a minute off the generationg for IE but added a minute to the netscape
generation. How can I get the IE performance up??

Any help would be gladly recieved!!
Re: Table Generation Sam Nabialek
4/26/2004 2:05:55 PM
Solution found!!!
It appears that using the Table Object Model is MASSIVELY less efficient
than using the DOM model. If I create the table using
document.createElement("tr")
and document.createElement("td") calls it is about 6-10 times faster. This
is
very unexpected since the MS advice I found on dynamically generating tables
suggests that the TOM is quicker than the DOM. This is only true for writing
the code, not executing it.

In case anyone else out these comes acroos this problem, now you know.

FWIW the code has the same performance under Netscape as it did using the
TOM.
Not sure what MS are doing under the hood, but it needs fixing.

[quoted text, click to view]
AddThis Social Bookmark Button