ColVis Restore Defaults takes a very long time

ColVis Restore Defaults takes a very long time

zecksteinzeckstein Posts: 16Questions: 6Answers: 0

I've been trying to get the debugger to work for me, but sadly it keeps locking my machine up so I can't upload my setup.

I'm using server-side and rendering everything through an ajax call. It's all working great except for this one thing. I have ColVis active and showing/hiding columns is very quick and easy, but when I click the "Restore Defaults" button, it consistently takes a very long time to take the action. I've timed it up to 15 seconds before.

My table itself loads in about 3 seconds on a page refresh, so even a complete redraw shouldn't be taking so long.

Any advice here?

Answers

  • kthorngrenkthorngren Posts: 19,868Questions: 26Answers: 4,686
    edited August 2023

    I don't think server side processing matters with column visibility. I don't believe there will be any requests to the server. How many columns do you have in your table? Possibly that is an issue.

    Is stateSave enabled? Maybe that is slowing down the restore.

    Are you using the column-visibility event?

    I built this simple example to show colvisRestore is quick.

    https://live.datatables.net/doyezoga/1/edit

    Yes its a small table. Maybe you can update it to show the issue. Can you post your Datatables code so we can see what you have?

    Kevin

  • zecksteinzeckstein Posts: 16Questions: 6Answers: 0
    edited August 2023

    I do have stateSave on, but it doesn't seem to make a difference either way.

    I can certainly share my setup. It's complex: https://pastebin.com/KskCzdF3

    I was just playing around with it again and it takes about 5 seconds today (shorter than previously). Not sure what may have changed. I'm developing this locally on WAMP, perhaps that's that actual root cause somehow? I guess I would expect other actions to be slower too in that case, so not sure...

Sign In or Register to comment.