Although we now seem to have a viable workaround, I'm still looking forward to receiving the full revision of the calculation engine. I think the recalculation times, although now acceptable for the point of view of users, are still too long. For example, with two group-by rows and 6,000 base rows, we should be able to do the recalculation in two passes thru the data x four partial summary calculations. Since this currently takes about 12 seconds on a 2 GHz processor, we are using (12 x 2,000,000,000) / (2 x 4 x 6000) = 500,000 CPU cycles for each partial calculation, which not reasonable. The engine must be re-calculating something over and over or doing some other unnecessary slow thing.
Infragistics sent me a workaround:
1. Install the latest hot fix (2007 V3 or 2008 v1).
2. In the BeforeSortChange event, add the following: e.ProcessMode = ProcessMode.Synchronous;
This fixed the test app that I sent them, but our production App still would hang up calculating summaries when re-sorting. I found an additional workaround which, in combination with the above, eliminated this behavior:
3. In the BeforeSortChange event, remove the summarycolumns that are of type SummaryType.Formula, using code like the following:
index = Grid.DisplayLayout.Bands[0].Summaries.IndexOf("Target"); if (index >= 0) Grid.DisplayLayout.Bands[0].Summaries.RemoveAt(index);
Light at the end of the tunnel ....?
Howard,
Your message has been forwarded to my attention.
Our developers are still working on development issue BR30242. From what I understand, the solution that our developers are considering involve changes to a number of things that interact with each other in a complicated fashion. It will likely take quite a bit more time for our developers to finish the task and resolve this performance problem.
To ensure that this issue maintains the appropriate visibility within Infragistics, I am escalating this issue.
As noted before, you will be automatically notified when a fix for this issue is ready for download. If we identify a workaround or other solution that doesn't require waiting for a hot fix release, a Developer Support Engineer will notify you, via the Support.Net@infragistics.com email address I've copied on this message.
Sincerely,
Vince McDonald
Manager of Developer Support, MCP
Infragistics, Inc.
I think this bug is not connected with custom formulas.For me the necessary conditions for reproducing are:There are many rows in grid (> 1000) and 3 or more columns are "grouped by".If I clear the data source and fill it with the new data, the application hangs.Here is a workaround I use:I've created the following class:
public class SwitchOffGroupByCookie : IDisposable { private readonly UltraGrid grid_; private readonly UltraGridLayout layout_ = new UltraGridLayout(); public SwitchOffGroupByCookie(UltraGrid grid) { grid_ = grid; layout_.CopyFrom(grid_.DisplayLayout); grid_.DisplayLayout.Bands[0].SortedColumns.Clear(); } public void Dispose() { if (layout_.Bands[0].SortedColumns.Count > 0) { foreach (UltraGridColumn col in layout_.Bands[0].SortedColumns) { grid_.DisplayLayout.Bands[0].SortedColumns.Add(col.Key, (col.SortIndicator == SortIndicator.Descending), col.IsGroupByColumn); } } } }
using (new SwitchOffGroupByCookie(grid_)) { dataSource_.Rows.Clear(); // fill data source with the new data }
I sent this e-mail: