JQuery Datatables Large Datasource locking the bro

2019-08-22 16:44发布

问题:

I have a large amount of data I wish to use with Jquery DataTable Plugin (6000 rows)

I'm currently using php to return a DOM Table and styling that using

$("#datatable-container").children("table:first").dataTable({
    "bJQueryUI": true,
    "sScrollX": "100%"
});

My issue is when rendering the table my browser locks for a period of time. I understand the threading limitations of javascript... I'm wondering if there is a better way to load the data / render the table that will not lock the browser?

Note simple 'paging' the data will not work unless someone can inform me as to how I would go about that and not loose datatables' paging or searching features.

回答1:

Have you considered paging your data? I think that from both a performance perspective and a design perspective paging your data would be the choice to implement considering that your data has 6,000 rows (and how many columns:)

Page!

Another option would be to implement paging combined with local storage, if appropriate.



回答2:

using DataTables server-side processing example from their website I was able to correct my problem. Thanks for your time.