Posted 8 September 2017, 5:22 am EST
Hello Marco,
You can apply some performance improvement tricks to increase the Spread's Performance:
1) In the WindowsForms version alot of the painting(when scrolloing, etc.) depends on how you set up the spreadsheet. If you are applying styles, celltypes or the like try to do it on column and row levels and not individual cells. If you are using the Text property try switching to the Value property so the text in the cell isn't subjected to parsing.
2) If you are not using sticky notes, then you can set AutoUpdateNotes to false to prevent the component from checking for sticky notes that need to be made visible or hidden or moved.
3) If you are using AllowCellOverflow, turning that off increases the performance of the layout calculations, because that feature requires lots of text width calculations on each change to the data in a cell.
4) If you are using formulas, setting AutoCalculation to false before your updates and then setting it back to true and calling Recalculate afterwards eliminates redundant intermediate recalculations of your formulas.
5) You can turn off the painting by calling the SuspendLayout method before setting the cell type and SetValue method and then call ResumeLayout method to resume the painting after the SetValue method. SuspendLayout will prevent the SpreadView from recomputing the layout of columns, rows, and cells when changes are made to the sheet. The layout objects are not part of the public API, but they cache all of the layout information required to paint the sheet, like the column widths, row heights, cell spans, cell overflows and the rectangles of cell notes that are always visible (Cell.NoteStyle = NoteStyle.StickyNote). If you are making lots of changes to the sheet in a block of code, using SuspendLayout will prevent the SpreadView from doing redundant intermediate recalculations of the layout objects as each change is made, and using ResumeLayout(true) will recompute the layout once after all of your changes are made. That will increase performance greatly, but there is more you can do depending on what features your sheets require.
6) However, with high number of cells being displayed at one time, some delay would be expected when running in debug through the IDE. If you build the project in release and run the executable, then you should see the Spread's cell being more responsive.
These types of changes can significantly improve performance. Hope this will help you. Thanks.