search box pretty slow when use with FixedColumns

search box pretty slow when use with FixedColumns

GustGust Posts: 17Questions: 0Answers: 0
edited March 2011 in General
Hello,

First, I would like to thank for this incredible plugin...

Second, I would like to know if there is something to do to prevent huge slowdown in search box speed when columns are fixed? It takes about 30 sec for each new letter added into the box to appear until the number of row shrink to 10 or 20. I would say also that my table don't have that much records (under 100). I make a demo with random data for 1000 lines and search box is pretty reactive when no fixed columns.

Here my initialisation code (SLOW version) :

[code]

TableToolsInit.sSwfPath = "{{=URL('static','plugin_added/DataTables-1.7.5/extras/TableTools/media/swf/ZeroClipboard.swf')}}";
$(document).ready( function () {
var oTable = $('.sortable').dataTable( {
"bJQueryUI": true,
"bAutoWidth": false,
"bScrollInfinite": true,
"sScrollY": "300px",
"sScrollX": "100%",
"bPaginate": false,
"bProcessing": true,
"bSortClasses" : false,
"oLanguage": {
"sSearch": "Search:"
},
"sDom": '<"H"Tfr>t<"F"ip>',
"oTableTools": {
"aButtons": [
"copy", "csv", "xls", "pdf",
{
"sExtends": "collection",
"sButtonText": "Save",
"aButtons": [ "csv", "xls", "pdf" ]
}
]
}
} );
new FixedColumns( oTable, {
"columns": 2
} );
} );

[/code]

If I remove those FixedColumns (FAST version) :

[code]

TableToolsInit.sSwfPath = "{{=URL('static','plugin_added/DataTables-1.7.5/extras/TableTools/media/swf/ZeroClipboard.swf')}}";
$(document).ready( function () {
var oTable = $('.sortable').dataTable( {
"bJQueryUI": true,
"bAutoWidth": false,
"bScrollInfinite": true,
"sScrollY": "300px",
"sScrollX": "100%",
"bPaginate": false,
"bProcessing": true,
"bSortClasses" : false,
"oLanguage": {
"sSearch": "Search:"
},
"sDom": '<"H"Tfr>t<"F"ip>',
"oTableTools": {
"aButtons": [
"copy", "csv", "xls", "pdf",
{
"sExtends": "collection",
"sButtonText": "Save",
"aButtons": [ "csv", "xls", "pdf" ]
}
]
}
} );
//new FixedColumns( oTable, {
// "columns": 2
// } );
} );

[/code]

I think to add a button to enable the fixed columns when needed as a workaround... Is there an other way to mitigate this problem??

Thanks

Gust

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Hi Gust,

    I've been working on a new version of FixedColumns which will hopefully help the speed situation. If you'd like to give it a go, ping me with your e-mail address through the contact form: http://datatables.net/contact .

    Allan
  • GustGust Posts: 17Questions: 0Answers: 0
    Hello allan,

    I try your new version It seems to work properly... It improve the speed a lot. I didn't mention it in my question, but it looks that the problem were related to the cloning of the columns... I keep in touch if I find bug in the new fixedcolumns script.

    Gust
  • GustGust Posts: 17Questions: 0Answers: 0
    Hello Allan,

    Just to let you know about this little glitch with FixedColumns.js you sent me... The vertical scroll bar is bit off with FF, with Chrome everything is fine. The scroll bar show just after the header end.

    Thanks.

    Ciao!

    Gust
  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Could you possibly send me a link to your example showing that please? I'm not seeing that in my test cases, so there might be something in your environment which is causing a hiccup in FixedColumns.

    Allan
This discussion has been closed.