Hi again.
With tables of many columns, the visible() function can become terribly slow, even when redrawCalc option is set to false.
Ref: columns().visible().
This code line hides all columns with header class = 'empty': table.columns('.empty').visible(false, false);
In the simple example I built, which contains 20 rows, if the table has 60 columns ... no problem. You can toggle the empty class columns in a fraction of a second.
Here is link to 60 Column Example. Click "Toggle Position Columns" button to demo.
But when the same table has 600 columns, the time to complete the toggle is 50 seconds!
Here is link to 600 Column Example.
It would actually be faster to rebuild the table from scratch than use the dt visible() function.
Is there better way to implement this function? My tables can reach over 1000 columns. At that point, attempting any ColVis is hopeless.
Thanks in advance, as always.
c