Script Error while loading long size data

Script Error while loading long size data

merihmerih Posts: 24Questions: 0Answers: 0
edited February 2012 in General
Hi All,

First of all, i would like to thank you for this wonderful tool of yours.
I have been using this plugin for more than a year in my projects and It works great..

I have just a couple of questions,
First of all, I am not so happy that the default pagination buttons use A tags in v.1.9.0. It effects other css tags in the page.. Is there a way to change them as a button..

Other question; in one of my project, I have 60,000 data in a table and it takes so long to load this size of data.
Firefox gives the error below;
"A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete."

When I click the continue button It loads the data and It works fine. Are there a better way to load this size of data? On the other hand to prevent to show this error will help me pass my problem? Do you have any recommends?

Thanks,
Merih

Replies

  • merihmerih Posts: 24Questions: 0Answers: 0
    For first question;

    I got "two_button": fuction in v1.8.2 and replaced it in v1.9.0. It works as a button right now. :)
    I still need recommend for the long size datas..

    Thanks alot
  • merihmerih Posts: 24Questions: 0Answers: 0
    any idea? :(
  • allanallan Posts: 61,826Questions: 1Answers: 10,131 Site admin
    > First of all, I am not so happy that the default pagination buttons use A tags in v.1.9.0. It effects other css tags in the page..

    Yes - its an unfortunate change that :-(. However, it is an important one for accessibility. There is instructions here ( http://datatables.net/upgrade/1.9 ) on how to update the CSS for the 1.9 changes. Or you could do as you have done and pull in the old pagination control.

    > Other question; in one of my project, I have 60,000 data in a table and it takes so long to load this size of data.

    Is it being loaded from the DOM (i.e. an HTML table)? If so, then consider using Ajax loading with deferred rendering enabled ( bDeferRender ). If you are using Ajax without deferred rendering, enable that option.

    Allan
  • merihmerih Posts: 24Questions: 0Answers: 0
    edited March 2012
    Thank you so much Allan,

    Now I got 67.000 data in the table. It loaded faster than I expected :)

    There is just one more problem. Search side was so slow in FireFox. And I got same error message while searching. :(

    "A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue."

    I posted the code below;

    [code]

    $('#orjMatchTable').dataTable( {
    "bServerSide": false,
    "bProcessing": true,
    "bDeferRender": true,
    "sAjaxSource": "http://localhost:8080/BilgiBankasi/example/PublishedMatchedListServlet?matchTypeId="+id,
    "sServerMethod": "GET",
    "bRetrieve": true,
    "sAjaxDataProp": "",
    "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
    $(nRow).addClass('gradeA');
    },
    "aoColumns": [

    { "mDataProp": "systemId"},
    { "mDataProp": "leftEntityIdentity"},
    { "mDataProp": "leftEntityName"},
    { "mDataProp": "rightEntityIdentity"},
    { "mDataProp": "rightEntityName"},
    { "mDataProp": "startOfUse"},
    { "mDataProp": "dateModified"},
    { "mDataProp": "rightEntityName"}
    ],
    "bRetrieve": true,
    "sDom": 'CT<"clear">lfrtip',
    "oTableTools": {
    "sSwfPath": "../resources/swf/copy_cvs_xls_pdf.swf",
    "aButtons": [
    "copy",
    {
    "sExtends": "collection",
    "sButtonText": "Save",
    "aButtons": [ "xls", "pdf", "csv" ]
    }
    ]
    },
    "bAutoWidth": false,
    "aoColumnDefs": [
    { "bVisible": false, "aTargets": [ 0,5,7 ] },
    { "sWidth": "15%", "aTargets": [ 5 ] },
    { "sWidth": "15%", "aTargets": [ 6 ] },
    { "sWidth": "15%", "aTargets": [ 7 ] }
    ],
    "aaSorting": [[ 5, "desc" ]]
    });

    [/code]

    Do you have any idea?

    Note: I've tested in Chrome as well, It was loaded much faster than Firefox. And search side was not slow.

    Thank you so much,
    Merih
  • allanallan Posts: 61,826Questions: 1Answers: 10,131 Site admin
    Hmm - surprised that Firefox gives a warning on that. Not at all surprised that Chrome is faster, but wouldn't have expected it to end up with a slow script warning.

    Can you give me a link? I think the way forward would be to use Firebug to profile the script and see what is happening. Also - do you have Firebug enabled when you do this - it has a significant performance impact on Firefox.

    Allan
  • merihmerih Posts: 24Questions: 0Answers: 0
    edited March 2012
    Hi Allen,

    I relised that search function only does't work on FireFox11 (Actually It works but so slow and FireFox11 is a beta version so It is normal I think :)
    It works on FireFox10 without any problem.. I am happy about that. :)

    I send you a link as a private message, You can check for firefox11 If you would like..

    Thank you so much :)
This discussion has been closed.