Need to build a fast-sorting datagrid application (desktop client)
I'm having trouble creating an application that handles a moderate amount of fast-refreshing data and displays it in a datagrid. Currently we're using a Telerik radgridview winforms control, and the refresh performance is quite decent - until one of the columns is sorted, which makes things take a nose dive, with the application becoming almost unusable. I don't have to display a lot of data, like, under 200 items - but they do get updated quite frequently, every half a second or so. The data is read-only, but we prefer to use a datagrid because it makes it easy for user to select what columns are shown and which one is used for sort.
Profiling shows that turning on sorting creates a ridiculous number of cell redraws - on the order of millions for several hundred property 开发者_StackOverflowchanges. Most of the CPU seems to be tied up in various GDI drawing methods that I assume deal with painting cells.
At this point almost anything is on the table, from hosting a WPF grid to take advantage of hardware accelleration, to buying another grid. If anyone has experience or advice with creating applications like this, it would be awesome.
No specific experience, but general question: can you limit how often redrawing of the screen occurs? It sounds like it is resorting AND redrawing everything every time a property is changed.
If you can't control how often sorts and redraws occur, another coding change could be to keep one copy of your data up-to-date, and then separately have the copy that your Telerik program sees. Then update the Telerik copy at fixed intervals (like every second). This is all without knowing how this program works, but is any of this feasible?
精彩评论