1. The sleep duration is too long.
2. Test it in release mode.
3. Add some measurements to understand the timing of each step.
I have changed it to Sleep(0), but putting a longer sleep (like 500ms) and show a short animation won't harm to end user, I think.
Using SQLite is too fast LOL.
I have removed the unnecessary .Refresh after SetData as you suggested.
Only left them at after .VisibleColumns.RemoveAt() and .sql1.ExecNonQuery2("UPDATE data SET ...")
My B4XPage_Created has a lot of localization, Theming, Styling which may slow down the start up of the page.
Beside the reading of database, another thing that I suspect may slow down the B4XTable is the create buttons of Edit column.
By the way, it is not really slow as I said. It just like 0.5 or less than 1 second.
Will check again on Release mode.
Thanks Erel.