I have TUniQuery (SELECT 0 as checkbox, * FROM table1) with CachedUpdates=true
+ datasource + grid (Devexpress cxgrid)
In grid I just need to show readonly data and 1 editable column with checkboxes
When I click on checkbox, data posts to dataset, but it is very slow (about 500ms).
I dont need to save data or edit any columns except checkboxes.
How can I improve performance?
Performance of posting data to dataset
If you are using cashed updates mode to update your TUniQuery, then any updates will be saved to database on calling the ApplyUpdates method only.
So possible reasons for slow record updating are:
- Maybe some event on updating is being executed slowly. Try to remove all events from this query and try to update your record again.
- Maybe some event on redrawing your grid is being executed slowly. Try to remove all events from your grid and try to update your record again.
- Maybe some RefreshOptions are turned on and after each update a refresh query is executed. Try to turn off all RefreshOptions.
- Maybe Devexpress CXGrid has very complex view or calculates a lot of summary values. It can slow down record updating. Try to update your record by standard TDBGrid.
Try to apply all four pieces of advice at the same time and I believe you issue will be resolved.
So possible reasons for slow record updating are:
- Maybe some event on updating is being executed slowly. Try to remove all events from this query and try to update your record again.
- Maybe some event on redrawing your grid is being executed slowly. Try to remove all events from your grid and try to update your record again.
- Maybe some RefreshOptions are turned on and after each update a refresh query is executed. Try to turn off all RefreshOptions.
- Maybe Devexpress CXGrid has very complex view or calculates a lot of summary values. It can slow down record updating. Try to update your record by standard TDBGrid.
Try to apply all four pieces of advice at the same time and I believe you issue will be resolved.