IE7 crazy slow

IE7 crazy slow

flippyheadflippyhead Posts: 11Questions: 0Answers: 0
edited October 2010 in General
I know IE7's javascript engine is total crap but... In FF, Chrome, Safari I'm rendering 5000 rows within a couple seconds and the search and sorting are snappy. It's great! But in IE7 it takes nearly a full minute to render the same data. Is there anything I can do speed up the rendering just in IE7 ?

My DataTables configuration is as follows:

_this.dataTable = jQuery(table).dataTable({
"oLanguage": {
"sSearch": "Search all columns:"
},
"bAutoWidth": false,
"bJQueryUI": true,
"bSortClasses": false,
"aoColumns": [
{"sWidth": '75px', "bSortable": false, "sType": "string", "bSearchable": false}, // edit control
{"sWidth": '0px', "bSortable": false, "sType": "string", "bVisible": false}, // email for filtering but not showing
{"sWidth": '130px', "bSortable": true, "sType": "string"}, // first name
{"sWidth": '130px', "bSortable": true, "sType": "string"}, // last name
{"sWidth": '250px', "bSortable": true, "sType": "string"}, // company

{"sWidth": "200px", "bSortable": true, "sType": "numeric", "bSearchable": false, "bUseRendered": false, "fnRender": function(oRow) {
var date = new Date(new Number(oRow.aData[5]));

var hours = date.getHours();
var ampm = 'AM';
if (hours > 12) {
hours = 12-(24-hours);
ampm = 'PM';
};

return (date.getMonth()+1) + '/' + date.getDate() + '/' + (date.getFullYear()-2000) + ' ' + hours + ':' + date.getMinutes() + ampm;
}
}, // updated at

{"sWidth": '80px', "bSortable": true, "sType": "html"}, // category
{"sWidth": '70px', "bSortable": true, "sType": "html"}, // role
{"sWidth": '25px', "bSortable": true, "sType": "string"}, // admin
{"sWidth": '25px', "bSortable": true, "sType": "string"} // responded
],
"sPaginationType": "full_numbers",
"fnInitComplete": function() {
jQuery('#tableLoadingIndicator').hide();
jQuery('#tableContainer').show();
}
});



Thanks

(I hate IE)

Replies

  • mzguptamzgupta Posts: 5Questions: 0Answers: 0
    HI flippyhead,
    Same problem I am facing ie7 Java Script engine is total crap.

    http://javascript.crockford.com/memory/leak.html

    Read above article but I don't think it gonna help :).
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Don't hide the table when your initialising it - that makes IE even slower that it normally is (by a significant amount!). I can only guess, since we don't know IE's internals, but in previous discussions in the forms we've seen this effect as well, and I believe that IE is taking non-displayed elements out of it's fast access DOM structures, which means that for every DOM request made inside the hidden element, IE is effectively parsing again the whole structure (or something like that). And this makes it horribly slow.

    Although this will help performance, it will probably not bring it back to a decent enough standard for a deployed web-page or application. With 5000 rows, I'd consider starting to look at server-side processing if IE in an important target for you. As you note, the IE7 Javascript engine is just appallingly slow.

    Allan
This discussion has been closed.