Hi,
We are using UltraWinGrid to display frequently updated data. The datasource is set to BindingSource which in turn takes a dataset. When there are a lot of updates coming in at the same time, the CPU usage spikes. It appears a GUI painting issue because when we shrink the application window to make updating region invisible, CPU usage comes back to normal. Is there a way to optimize grid painting performance? Would virtual mode help?
Thanks.
Simon
Simon,
What version of the grid are you using? I know that a lot of performance improvements were made in the 7.3 release. From what it sounds like, it definitely seems like a painting issue, since the size of the grid directly affects performance. One thought would be that if you know you're getting a large batch of updates at once, you could try wrapping them in a BeginUpdate/EndUpdate block on the grid so that it only needs to paint once.
-Matt
I am using 8.2.2 (Version 8.2.20082.1000). Is the same performance enhancement in 7.2 that you mentioned applied to this newer one?
The CPU spike, along hugh memory increase is constantly crashing the application.
The performance increases were made in 7.3, which is applied to all versions after that. Have you taken a look at the WinGrid Performance Guide? I really can't say why your grid would be using so much memory or why it would be crashing without the app. Assuming you're doing everything you can that is mentioned in the performance guide, you should probably submit a sample to Developer Support.
I'm running into the same problem, I'm using the most recent version (8.3) and am using an UltraDataSource to drive the data for the grid. I'm updating the data directly in the data source base on a MouseMove event which when over the appropriate form fires frequently. All updates are surrounded by Begin/EndUpdate and Suspend/ResumeRowSynchronization blocks, but I'm still seeing a CPU spike during any update. I do not see any CPU spike when I resize the grid so it's no longer showing, eg so that the form is only the title bar. I'm at a loss as to what more I can do to eliminate this innefeciency, any suggestions?
I don't know if a MouseMove event is the best place to do this in the grid, especially since cells will already be invalidated when you mouse over them, so you might be doubling up on the amount of work being done. Why do you need to do this many updates, and are you only updating the cell over which the mouse is positioned, or are you updating all of the data? You might be able to leverage the CellDataRequested event of the UltraDataSource if you need to get an updated value instead of relying on the MouseMove.