Posted 8 September 2017, 1:18 pm EST
We are using Spread for an application that receives several (>2000) updates a seconds. We notice that at updates >400 the application slows down condsiderably. One of the solutions that worked in another project (using another grid control) was to do batch updates, i.e. consume all the incoming messages but update the grid only twice a second. This scales really nicely.
The way it was implemented was that a DataTable was subclassed and the raising the Changed event periodically i the data has changed.
We are heavily using the DefaultSheetDataModel so don't want to rewrite the application to use DataTable. But will prefer to subclass the DefaultSheetDataModel to achieve similar results.
The one way I could achieve is
Private Sub TimerElapsed(ByVal source As Object, ByVal e As Timers.ElapsedEventArgs)
If isChanged Then
MyBase.OnChanged(New FarPoint.Win.Spread.Model.SheetDataModelEventArgs(0, 0, -1, -1, FarPoint.Win.Spread.Model.SheetDataModelEventType.ModelUpdated))
isChanged = False
But I don't think this is efficient as it is updatign the whole grid and not just the rows/cells that have changed.
Is there a better way, or am I barking up the wrong tree and there is a better way to handle such large updates. Especially is it possible to update (repaint) only the visible cells and ignore the vast majority that are not in the ViewPort. Or does the Spread already do this?