Performance Improvement suggestion on IE
Performance Improvement suggestion on IE
Hello,
I've seen many topics about the performance issues in Internet Explorer since IE has a slow javascript engine. In my case, I have a table of 102 columns and many rows (500 till thousands). It runs correctly in Firefox and Chrome but quite slow in IE.
After profiling it, the slowliness was caused by the append() function _fnAddOptionsHtml. It took 35 seconds in my case for 500 rows. After changing the append function to .html, it became about 25 seconds faster.
Would it make sense to change this in future releases and use .html or .innerHtml instead of append()?
Thanks,
Sami
Replies
The problem with using
$().html()
is that is writes new DOM elements rather than using the existing ones, which may have event listeners attached to them. The results is that those listeners would be lost.I'm genuinely surprised that
html
is faster thanappend
. Can you link to the pages showing that so I can profile it as well?Allan