Performance issue when using an entire html table,inserting it into the DOM, & then converting it DT

Performance issue when using an entire html table,inserting it into the DOM, & then converting it DT

Harsh DamaniaHarsh Damania Posts: 8Questions: 4Answers: 0

I am generating a plain HTML table , inserting it into the DOM, and then converting it to a DataTable. While this certainly produced the desired result, it did not produce the desired result in a reasonable amount of time. Even worse, the entire tab would freeze as the table took several seconds to initialize.
Specially in IE 11 it takes more than 16 seconds to load 1000 records.

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Read the FAQ's, specifically "Q. DataTables is running slow. How can I speed it up?"

  • Harsh DamaniaHarsh Damania Posts: 8Questions: 4Answers: 0

    Client-side processing - DOM sourced data: ~5'000 rows. Speed options: orderClasses.
    As per the FAQ
    $('#example').dataTable( {
    "orderClasses": false
    } );

    Still it takes time.
    In chrome it loads in 4 seconds

  • HPBHPB Posts: 73Questions: 2Answers: 18
    edited June 2017

    As said in the FAQ, deferRender can help to speed up things as well.

  • allanallan Posts: 63,230Questions: 1Answers: 10,417 Site admin

    Also, if that doesn't help, please link to a test case showing the issue so it can be profiled.

    Ajax loaded data with deferRender is about as fast as it can be made to go, particularly in legacy browsers.

    Allan

  • Harsh DamaniaHarsh Damania Posts: 8Questions: 4Answers: 0

    Thanks, I will check and let you know

This discussion has been closed.