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)
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 :(
wassistef said: HandleException : -there is no try catch without trace or in loop
Just because there is no try...catch in your code doesn't mean that exceptions aren't being raised and caught. This could be a try... catch that exists in our assemblies or even in the dotnet framework.So it would still be worth it to set the IDE to break on all run-time exceptions and see if any are occurring.
If resizing a column with the mouse takes 2-4 seconds, then that is a further indication that this is an issue with Exceptions that are being caught. The only other possibility I can think of it that you are handling an even of the grid and you have some very inefficient code in the event handler.
Yes I know that, but my english is pretty awfull :)
I have no exception even when exception from other assembly are enabled.
I 'have an Exception from sql server but this doesn't concern UltraWinGrid but EntityFramework.dll
Hello,
At this point we would need a sample project that reproduces the issue in order to see what the cause is.
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