Performance issues

Performance issues

SimonJSimonJ Posts: 5Questions: 0Answers: 0
edited June 2013 in General
I need to know the best way to implement DataTable because I'm currently having performance issues using IE.
I need to have a good performance for about 10 000 - 15 000 records.
The data come from a text file that I need to process first. I then create an array that I pass to aaData.
I'm having some performance issues when I sort or use some filter on columns. I also have a "A script is running slowly" error. It also takes a bit of time to load the table.
Could anyone give me advice on how to increase my performance?
Thanks

Replies

  • essexstephessexsteph Posts: 57Questions: 0Answers: 0
    It would be useful to know where the text file comes from, how dynamic is it and what processing you need to do. I typically use DataTables with large data sets (40,000+ records), but it is pretty static and I do a lot of processing when I import the data into my database. I then use server-side processing to ensure I never have to pass large amounts of data to the browser.

    Steph
  • SimonJSimonJ Posts: 5Questions: 0Answers: 0
    The text file is located on the server and I need to process the file each time the page is called. I dont have a database so I pass all the data at once each time. Thats where I'm not sure what to do.
  • essexstephessexsteph Posts: 57Questions: 0Answers: 0
    What generates the text file?
  • SimonJSimonJ Posts: 5Questions: 0Answers: 0
    Not sure.. Still new on this project. So I'm kinda stuck with this text file
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Have you enabled deferred rendering? Also have you look through the speed FAQ: http://datatables.net/faqs#speed ?

    Allan
  • SimonJSimonJ Posts: 5Questions: 0Answers: 0
    Hi Allan,
    Yes I already gone trough the speed FAQ. Here is what I got so far :
    [code]
    $('#demo').html('DateActionResult CodeCall DelayCommand DelayConfiguration NameCall ByGUIDDateActionResult CodeCall DelayCommand DelayConfiguration NameCall ByGUID');
    /*Initialistaion du DataTable*/

    oTable = $('#table_id').dataTable({
    "aaData": eval(table),
    "bJQueryUI": true,
    "bDeferRender": true,
    "bSortClasses": false,
    "aoColumns": [
    /* Date */null,
    /* action */null,
    /* Result */null,
    /* CallDelay */null,
    /* CommandeDelay */null,
    /* ConfigName */null,
    /* CallBy */null,
    /* GUID */{"bVisible": false }
    ]
    }).columnFilter({
    sPlaceHolder: "head:after",
    "aoColumns": [
    { type: "date-range", sRangeFormat: "Between {from} and {to}" },
    { type: "select", values: $('#table_id').dataTable().fnGetColumnData(1) },
    { type: "select", values: $('#table_id').dataTable().fnGetColumnData(2) },
    { type: "number-range", sRangeFormat: "Between {from} and {to}" },
    { type: "number-range", sRangeFormat: "Between {from} and {to}" },
    { type: "select", values: $('#table_id').dataTable().fnGetColumnData(5) },
    { type: "select", values: $('#table_id').dataTable().fnGetColumnData(6) },
    ]

    });
    [/code]

    FAQ says it should be good for about 50 000 rows and I'm having issues with 10 000.
    I'm I doing something wrong here?
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    What happens if you disable the column filter plugin?

    Also, can you link to the page so we can see what is happening please?

    Allan
  • SimonJSimonJ Posts: 5Questions: 0Answers: 0
    Removing column filter does not change anything and I'm not able to give you a link to my page... Sorry for that. But basically when having around 10 000 rows, the scripts run for about 10 seconds and then I have a "A script is running slowly" error. I then press continue running. it runs for about another 10 seconds and then I have the same error. After I press again "continue running" I can now see my page. When I use sort, search or filters, the same things happens again.
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Okay thanks for trying that. We'd need a link to the page to see what is going wrong and be able to offer any further help, as I'm not sure what is wrong and it should be able to cope with the data set you have.

    Allan
This discussion has been closed.