Unable to load an array of 500*1000 in UI using datatable.

Unable to load an array of 500*1000 in UI using datatable.

katheeshkatheesh Posts: 1Questions: 1Answers: 0

I have an array of array of size 500*1000. When i try to load this, i get Aw Snap memory error from Chrome browser. It was all fine till Chrome v102. Now in the latest version we get this error.

Code : https://drive.google.com/file/d/1pUs5GvZTYlX2n0ZxHghbIpErOBSfzi8z/view?usp=sharing

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    edited October 2022

    Add deferRender set to true and enable paging. That will help.

    For reference this is the DataTables initialisation from that document:

    var t_CharterDatatable = $('#ReferenceDetailRightPartGrid').DataTable({
        "aoColumns": GetColumnsforDataTable(),
        "aaData": completeJsonArray,
        "columnDefs": [{
            "searchable": false,
            "orderable": false,
            "targets": 0
        }],
        "searching": false,
        "paging": false, "bAutoWidth": false
    });
    

    Allan

    Edited: Suggested enabling paging to reduce memory usage.

Sign In or Register to comment.