I have 4 Ultragrids ( 380 rows and 42 columns) and PerformAutoResizeColumns take 28 seconds.
I 'use :
- GridPrice.DisplayLayout.Bands[0].PerformAutoResizeColumns(false, PerformAutoSizeType.VisibleRows); // 3min without Visible row only- The cells are Text and there is no editor- There is Calculator manager on grids but not used during resizing process- infragistics 13.2 but the problem was the same on 11 and 12.
Hi,
Does the problem occur every time? Or only the first time you call PeformAutoResizeColumns?
In a case like this, where you are using UltraCalcManager, the column cannot be sized until the calculations are completed. So what might be happening here is that calling PeformAutoResizeColumns is forcing the entire calculation network to completely calculate everything before any resizing can begin.
If that's the case, then I would expect only the first call to PeformAutoResizeColumns to be slow. Any subsequent calls would be very fast, since all of the calculations would already be completed. You could also verify my theory by disabling the CalcManager and see if that speeds things up.
Without UltraCalcManager this take the same time ( 25sec) and all the calls are slow ( the first and the other)
Hello,
Thank you for your response.
Are you running the application through Citrix or some other similar technology?
The production of the application is on Citrix but i develop and run it directly on my computer :
- Windows 7
- Intel Core i3 @3ghz
- with hardware accélération enabled
I send you profiling screenshot ( the grid are all the same size and i chose only visible row)
when i retry to resize all grid without change the data, it is always slow
Okay... well that rules out the calculations. If you could reproduce the issue in a small sample project and post it here we could check it out and tell you exactly what's causing it. Without that, all I can do is guess.
The first thing I would recommend is that you set the Visual Studio IDE to break on all run-time exception. Exceptions that are caught and handled is a common cause of performance issues.
Another possibility is that your data source is recursive. The method will walk over every band, so if you have a recursive data source with an essentially infinite number of bands, that could be an issue. Try setting MaxBandDepth (which defaults to 100) to a value between 5 and 8 and see if that helps.
MaxDepth band is 8 :)
My data souce is an entity of 4 band ( only 2 used ,load and visible)
HandleException :
-there is no try catch without trace or in loop
Note : When I resize a column with mouse its take 2-4 seconds
I will try to make sample but this is complicated with my amount of work :(
Thank you very much it is 100x faster !!
I've been looking at your sample project and I think the key factor here is your setting of the RowSizing property. You are setting RowSizing to AutoFree.
The reason the AutoFree setting has an effect is that every time you resize a column, the 'Auto' setting on the row means that there is a potential for the row height to change. So when you size the column, the grid is also re-calculating the height of the row, which of course takes all of the other cells into account and it's very inefficient.
I'm not sure there's anything we can do about this, but it seems like there's really no reason for you to be using RowSizing.AutoFree, anyway, so you could just remove this setting and leave RowSizing set to Default and everything works much faster.
I have logged this issue with our developers. I have also created CAS-127533-Z8F6Z5 to track the issue.
I was able to reproduce the issue using your sample, so I have asked David to write this issue up for developer review so we can look into it in detail.
I made you a sample ( vs winforms solution): The code is simple but Ugly :)
I use :
- VS 2010 ( project work on 2013 )
- Infra 13.2.20132.1011
- .net 4 with .Net 4.5.1 installed
- Windows 7 64