Closed saulgreenberg closed 7 years ago
See Adding a new row, and redordering items in controls or spreadsheet.
AddControlButton_Click invokes: this.OnControlOrderChanged();-> UpdateDisplayOrder ->SyncTempateTable ToDatabasewhich
SyncTempateTable ToDatabase deletes all the rows in db and then readds all rows. I think this is the bottleneck.
Resolved by several methods. It is now significantly faster. While additional performance tweaks can be done, it may not be worth the effort as it is now fast from a UI perspective.
In particular: For AddControlButton, created a new method that just updates all control and spreadsheet order values For Reordering controls and spreadsheets, fixed it so that it no longer performs multiple database updates for each and every row.
Causes very slow updates when new rows are added, and when repositioning controls in UI or in spreadsheet.