Datatable performance improvement

Datatable performance improvement

avinash_abhi95avinash_abhi95 Posts: 3Questions: 2Answers: 0
edited March 2020 in Free community support

I am using datatbale with MVC.Net.

I have a data table with 26 columns and around 3000 rows which is experiencing performance issues. It takes around one minute for DataTables to render the table (Data is returning from controller very quickly but converting in to Datatable is taking so long). Due to business requirements I cannot use paging and searching, so DataTables is having to render all 3000 records. My .cshtml file will create HTML DOM table and then my data table is:

var table = $('#tblReport').DataTable({
                        "paging": false,
                        "info": false,
                        fixedHeader: true,
                        searching: false,
                        scrollY: tableH + "px",
                        scrollX: true,
                        scrollCollapse: true,
                    });

                    new $.fn.dataTable.FixedColumns(table, {
                        leftColumns: 1,
                        heightMatch: 'auto'
                    });

I read that it would be faster if I used ajax instead of making DataTables convert the DOM. But due to business requirement, I could not use ajax because my rows are not straight forward(I need to color the cells based on my model, need to show popup for few cells, etc).

Could anyone please help me how can I improve the performance of this kind of datatable?

Answers

This discussion has been closed.