Jquery Datatable very slow on IE7
Jquery Datatable very slow on IE7
selmantayyar
Posts: 1Questions: 0Answers: 0
Hi,thanks for this great plug-in.
i have some problems using DT on IE and i asked this question on stackoverflow.
http://stackoverflow.com/questions/10431038/jquery-datatable-very-slow-on-ie7
Can you please have a look?
Cheers!
i have some problems using DT on IE and i asked this question on stackoverflow.
http://stackoverflow.com/questions/10431038/jquery-datatable-very-slow-on-ie7
Can you please have a look?
Cheers!
This discussion has been closed.
Replies
I too have found very slow table creation on IE7/IE8 relative to Chrome/Firefox 13 (see below).
My question is really about expectations:
- should I expect IE7/IE8 to be over 100 times slower than Chrome/Firefox13 when creating
a reasonably small table (seems crazy, but lots of horror stories on google, some may be true).
- is there some mitigation around table creation for IE7/IE8 I don't know about (I don't know any,
so the bar is low on that one)
- more likely to be something badly wrong at my end that Firefox13/Chrome does not punish but IE does.
Thanks in advance for any advice or observations
My tests
I repeatedly timed the creation of a data table in a number of browsers, all bar IE7 on the same PC.
I used a stopwatch which I started as I clicked on an alert that preceded the call to create the table
(javascript based timings proved unreliable in IE due to the high CPU load during table creation).
The table had 1500 rows ,31 columns, no nulls or undefined in data, sorting disabled, no special renderer or other callbacks, column types defined as string and aaData pre-populated before table creation. No explicit event handling was attached to the table.
Used jquery 1.7.1 and dataTables 1.9.1.
Table created in a visible div.
Firefox 13/Chrome: approx 1 second.
IE8 in standards mode: approx 200 seconds, 100% CPU during creation.
IE7: approx 600 seconds, 100% CPU during creation.
(you can see why a manual stopwatch was good enough).
I ran a profiler in IE8 which showed the bulk of time being spent in _fnAddData and _fnCreateTr.
Allan
That upload was from a chrome browser - in IE8, the debugger upload fails under heavy CPU load.
I really appreciate the help, thanks.
IE7: from 600 secs to 30 secs
IE8: from 200 secs to 5 secs.
The page size was 10 rows.
There was still 100% CPU for duration of table creation.
Allan
If it made a big difference, I could probably force a maximum of (say) 12 columns and update column data when a user selects a set of columns that includes columns not in the default set (I believe it is possible to search outside the table content so it should work more or less the same from the user's point of view provided the delays are acceptable).
The main question for me is if IE7 is "naturally" ++much slower than firefox etc and I should work around it or if I am just using DataTables the wrong way for the IE7 environment (at some level these alternatives overlap, but the emphasis is different).
Thanks, again
Hah - yes. Here is Microsoft's own measurements for IE9 (keep in mind that this is more than a year ago, so Firefox etc will have improved since then): http://ie.microsoft.com/testdrive/benchmarks/sunspider/default.html . Note that they show the comparison to IE8 - not IE7. IE7 is probably an order of magnitude slower than IE8 - so way off that scale!
Allan
Thanks very much for the help.
Without the plugin:
IE7: bDeferRender: false, 600 secs
IE7: bDeferRender: true, 30 secs
There was still 100% CPU for duration of table creation.
With the plugin:
IE7: bDeferRender: false, about 2 secs
IE7: bDeferRender: true, about 1 sec
Table creation too short to notice any heavy CPU utilization.
As an added bonus, bits of my site that broke under IE7 work again.
Details about Google Chrome Frame:
https://developers.google.com/chrome/chrome-frame/