Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
185
PerformAutoResizeColumns() very slow in 14.1
posted

Hello,

Whenever we refresh an Ultragrid control in our project, we make the following specifications (control is referenced here as "fg"):

fg.DisplayLayout.Override.CellClickAction = UltraWinGrid.CellClickAction.RowSelect
fg.DisplayLayout.Override.SelectTypeRow = UltraWinGrid.SelectType.Extended
fg.DisplayLayout.Bands(0).Columns(0).Hidden = True
fg.DisplayLayout.Override.AllowUpdate = DefaultableBoolean.False
fg.DisplayLayout.Override.DefaultRowHeight = 25
fg.DisplayLayout.Override.HeaderClickAction = UltraWinGrid.HeaderClickAction.SortSingle
fg.DisplayLayout.Override.RowAppearance.TextVAlign = VAlign.Middle
fg.DisplayLayout.ScrollStyle = UltraWinGrid.ScrollStyle.Immediate
fg.DisplayLayout.ScrollBounds = UltraWinGrid.ScrollBounds.ScrollToFill
fg.AlphaBlendMode = AlphaBlendMode.Disabled
fg.DisplayLayout.MaxRowScrollRegions = 1
fg.DisplayLayout.MaxColScrollRegions = 1
fg.DisplayLayout.Override.RowSizing = UltraWinGrid.RowSizing.Default
fg.DisplayLayout.PerformAutoResizeColumns(False, UltraWinGrid.PerformAutoSizeType.AllRowsInBand)

When our developers were using Infragistics version 12.1 we experienced no substantial slowdown with those specifications but upon upgrading to version 14.1 loading large datasets became very slow. We tracked this slowdown to the PerformAutoResizeColumns call. If we comment out this one line in the refresh, loading up an UltraGrid with ~17,500 rows takes roughly two seconds. However, if we un-comment that line and the control performs the re-size the reload takes approximately 40 seconds. This is slow load is unacceptable to our customers and this scenario is not uncommon at all. Is there something in the way we're calling PerformAutoResizeColumns or the way we're setting the Ultragrid properties that is causing this massive loadtime?

Thank you,
Bob

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Bob,

    I can't think of any reason why the PerformAutoResize method should be so much slower in 14.1. Although frankly, I can't see how the grid could have been working that quickly in the older version with that many rows.

    I ran a test using v12.1 and 14.1 with the same application and I applied all the same settings you posted here. I ran the tests several times and the results were very consistent.

    In 12.1, my test took around 14 seconds.

    In 14.1, my test took about 18 seconds.

    So there seems to have been a small change there, but nothing so drastic as you are reporting. Of course, the speed largely depends on the number of columns, data types, etc. My grid happens to have 19 columns with a wide variety of data types. So it may have something to do with the number and DataTypes of the columns in your application, which you didn't include here.

    The first thing I would do is try setting Visual Studio to break on all exceptions and see if there are any exceptions which are occurring during the PerformAutoResizeColumns call which might be getting caught so you are not seeing them. Exceptions are a very common reason for performance issues like this.

    If that doesn't help, then is there any way you could post a small sample project here demonstrating the issue so we can reproduce it?

Children