DataTables Slow Performance in IE11, must use in DOM Mode (JSP-created HTML)

DataTables Slow Performance in IE11, must use in DOM Mode (JSP-created HTML)

Eugene_BEugene_B Posts: 19Questions: 8Answers: 0

Hi, my DataTables is used in the "DOM Mode" where the server JSP outputs a regular table element, and then on top of that I issue the **$('#...').DataTable() { .. } **call to make it a DataTable with sorting/filtering.

The architecture of the application is Struts and JSPs; the table is pre-rendered using Struts' tags. Thus, it is a complete and ready HTML that I transform into a DataTable. It must remain that way, and the app cannot be redesigned to be AJAX-based app. It is an older server-side based app.

What I see is that the DataTable works great in Firefox and Chrome, but in IE11 the performance is poor. The # of rows is 150-200. To display this small number takes 10 sec. in IE11 but 2-3 sec. in FF/Chrome.

The only real suggestion I saw is to reprogram using AJAX data retrieval, but the architecture of the app does not allow it.
https://stackoverflow.com/questions/24745571/jquery-datatables-very-slow-in-ie-11
https://stackoverflow.com/questions/42330036/ie-11-datatables-dom-performance-issue

Since that's not applicable to me, any other thoughts on this?

Answers

  • Eugene_BEugene_B Posts: 19Questions: 8Answers: 0

    Side note: using DataTable 1.10.18

  • Andrew1178Andrew1178 Posts: 24Questions: 6Answers: 0

    I'm thinking maybe you can "fake the ajax" so to speak.

    So what if you returned your data from the server in JSON format? You can have some javascript in your page which returns the data for the table in a function. Then you could create your table from this JSON data?

  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin

    Yup - that's good thinking @Andrew1178. Dump the data into a Javascript variable and then initialise the table using data to pass in the array of data. You can then use deferRender to speed up display.

    Beyond that, we'd need a link to a page showing the issue so it can be profiled and see if there is anything obvious that can be done to improve the performance.

    Allan

  • Eugene_BEugene_B Posts: 19Questions: 8Answers: 0

    My complicating issue is that the table contents are HTML fields like textboxes and dropdowns, not plain text. So I would need a way to do HTML2JSON / JSON2HTML. It's 100% a field table, not a static table! I'd need to store and restore the properties values etc.

  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin

    In that case we'd need a link to the page showing the issue as I mentioned above so it can be profiled and checked to see if there are any obvious changes that can be made for performance. If there were a magic "go faster" option in DataTables, I'd have it enabled by default :).

    Allan

This discussion has been closed.