4 ms·
IE has a similar issue with adding page elements. I was trying to add a bunch of tr/td elements to a page. My goal was to load a 5,000+ row excel file. I tried
by keanebean86 7y ago
IE has a similar issue with adding page elements. I was trying to add a bunch of tr/td elements to a page. My goal was to load a 5,000+ row excel file. I tried using document.createElement but it was painfully slow. I switch to string concatenation and element.innerHTML. It was about 30 times faster.
This was only in IE 11 and edge. Chrome and Firefox took basically the same time for both.
I added them all to a new, detatched tbody. After my appending loops I removed the existing tbody then appending the new tbody to the table.