I have a windows forms app that is binding a dataset to an infragistics UltraGrid. The binding operation is taking over a minute to execute. I have run a trace on it using dotTrace and thetime is spend with operations by the UltraGrid for sorting, setting dirty elements,drawing, etc. I have a copy of the JetBrains dotTrace log that I can send to anyone that may have suggestions on improving the speed.
What version of the grid are you using?
What is your data source? Are you using a BindingSource? Is your data source recursive?
UltraWinGrid Version 5.3
Visual Studio 2003 project so BindingSource is not supported yet
Binding to a Dataset
Hi,
That's a pretty old version of the grid. There have been a lot of performance improvement made to the grid over the years, so you may want to consider upgrading.
Without more information, it's hard to guess what exactly is slowing it down. But here's a couple of basic things you can test:
1) If your data set has a recursive relationship, it might cause a performance problem, so try setting grid.DisplayLayout.MaxBandDepth to something like 5 and see if that helps.
2) If you are using a ValueList in the grid and the items on the list don't match the data type of the items in the grid, there may be exceptions occurring that are handled by the grid. This can slow things down considerably. Try setting the Visual Studio IDE to break on all run-time exceptions and see if there are any occurring.
3) ValueLists can also slow things down if the value in the grid cell doesn't match any items on the list. Just as a test, try running your application with no ValueLists and see if the performance improves.
4) If the issue has to do with painting and UIElements, you can reduce the number of elements the grid creates by making use of the DIsplayStyle property on the Column. I'm not sure if this property exists in v5.3, though - it may have been added in a later version. But if it's there, it will allow you to improve the performance of some columns by turning off certain features you know you don't need.
Looking at the profiler these are the methods that are taking the most time with method, time, and number of calls
Is this some of the items that have been optimized with newer versions of the control. I could probably talk the business unit into letting me work on prototyping an updated version with the newer infragistics control if we would definitely be able to get much better performance. Since we would have to upgrade to the newer version of the .net framework and the infragistics upgrade it's not just a simple switch out to the new controls. I wanted to sent these results to you to see what you think. Thanks for all your help so far.
Disable all the events on the grid and enable it after finishing the binding. I have found that this controls calls a lot unwanted events.
There isn't really enough information here to go on. It depends why these methods are being called and from where.