Slow init or redraw on scrollX tables with lots of columns
Slow init or redraw on scrollX tables with lots of columns
Looking back through https://datatables.net/forums/discussion/64103/lower-the-initialization-time-for-long-scrollable-tables, one comment was that the initialization is slow because DT has to read and write the widths. Could this be avoided if the width was provided? If in columnDefs or columns, the width is provided, no calculation needs to be done, right?
I have a table with 290 columns and it takes about 45 seconds to draw the table. It's similarly sluggish when searching, presumably because DT nukes and repaints the whole thing with the filter applied. Would this get faster if I just provided the column widths? I wouldn't mind fixing them to specific widths and having per-cell overflow hidden or ellipsed.
Answers
Possibly
autoWidth
will help with the use ofcolumns.width
. A simple / quick test might be this init code snippet:For example:
https://live.datatables.net/fawiyome/1/edit
Not the
table
width is set to a specific value.Kevin
Thanks. I do have the above in my code so I'll have to test more to see if I can figure out why it's sluggish to render.
This section of the FAQ should help, it discusses various techniques to improve performance.
Colin