Performance Issue with Not-Huge Table
Performance Issue with Not-Huge Table
redandwhite
Posts: 5Questions: 0Answers: 0
This table generally contains between 500-2000 rows. At 500 on a fast machine it performs fine; at 2000 or on a not-so-fast-machine, it's nearly unusable. I'm sure I'm doing lots of things wrong, so please enlighten me:
[code]
var tbl = $('#keywordTbl').dataTable({
"bDestroy": true,
"bInfo": true,
"bJQueryUI": true,
// "bLengthChange": true,
"sScrollY": "400px",
"bPaginate": false,
"bStateSave": false,
"bAutoWidth": true,
"aaSorting": [[1, "desc"]],
"bSortClasses": false,
"aoColumns": [
null,
{ "bSortable": true },
{ "bSortable": true },
{ "bSortable": true },
{ "bSortable": false },
null
]
});
tbl.fnSetColumnVis(5, false);
var hideKeywords = ($("#showHideExcluded").val() == "true");
if (hideKeywords) {
tbl.fnFilter('included', 5);
} else {
tbl.fnFilter('', 5);
}
[/code]
In IE, user's constantly see the warning that a script on the page is making the browser run slow and would they like to stop it. That's just during load/initial display. Would love to know where to start.
[code]
var tbl = $('#keywordTbl').dataTable({
"bDestroy": true,
"bInfo": true,
"bJQueryUI": true,
// "bLengthChange": true,
"sScrollY": "400px",
"bPaginate": false,
"bStateSave": false,
"bAutoWidth": true,
"aaSorting": [[1, "desc"]],
"bSortClasses": false,
"aoColumns": [
null,
{ "bSortable": true },
{ "bSortable": true },
{ "bSortable": true },
{ "bSortable": false },
null
]
});
tbl.fnSetColumnVis(5, false);
var hideKeywords = ($("#showHideExcluded").val() == "true");
if (hideKeywords) {
tbl.fnFilter('included', 5);
} else {
tbl.fnFilter('', 5);
}
[/code]
In IE, user's constantly see the warning that a script on the page is making the browser run slow and would they like to stop it. That's just during load/initial display. Would love to know where to start.
This discussion has been closed.
Replies
See what difference that makes, but 2000 rows is typically around the point that we start to see performance in IE drop off significantly. IE( I believe is much better for this, but with IE8<, 2000 rows is roughly the point to start consider using server-side processing. Also, make sure you aren't initialising the table in a display:none element - that absolutely kills IE.
Beyond that, it would be starting to look at optimisation of DataTables. I've already done a good deal of work on the optimisation (make sure you are using the latest version of DataTables :-) ) but any suggestions for how to improve it are always welcome!
Allan
I'm working on a longer term plan to improve the documentation at this very moment... :-)
Allan
I think you should be okay with your filtering approach since the filter is cumulative. Just don't allow them to change the individual column filter for the hidden column :-).
Allan