I've been tracking down a performance problem, and I have it trimmed down to a sample application. For code I am using, see below.
Edit: This also repros in the "RadControls for WPF Q3 2011 SP1 Demos" package, using the "Scrolling 1 Billion Cells" example.
A) Scroll to the bottom of the RadGridView, so that the bottom-most row is in-view.
B) Attempt to resize the window.
At this point my entire OS hangs. I am able to regain control of the OS by CTRL-ALT-DEL then cancelling. At this point I can break the debugger and determine the code is within GridViewCellsPanel.MeasureCell (bottom of stack is GridViewDataControl.MeasureOverride).
I suspect the RadGridView is de-virtualizing when this happens, as the performance gets worse with more records. While this is happening, I can watch in Task Manager that the CPU usage is pegging and the memory usage goes from about 50MB to about 600MB.
Any suggestions? This will be a blocker since we do not experience this behavior in WPF's native DataGrid.
Thanks -
- Graeme
XAML:
Sample class used:
Loaded Event Handler:
Edit: This also repros in the "RadControls for WPF Q3 2011 SP1 Demos" package, using the "Scrolling 1 Billion Cells" example.
A) Scroll to the bottom of the RadGridView, so that the bottom-most row is in-view.
B) Attempt to resize the window.
At this point my entire OS hangs. I am able to regain control of the OS by CTRL-ALT-DEL then cancelling. At this point I can break the debugger and determine the code is within GridViewCellsPanel.MeasureCell (bottom of stack is GridViewDataControl.MeasureOverride).
I suspect the RadGridView is de-virtualizing when this happens, as the performance gets worse with more records. While this is happening, I can watch in Task Manager that the CPU usage is pegging and the memory usage goes from about 50MB to about 600MB.
Any suggestions? This will be a blocker since we do not experience this behavior in WPF's native DataGrid.
Thanks -
- Graeme
XAML:
<telerik:RadGridView ItemsSource="{Binding}" />Sample class used:
public class Junk{ public int Prop0 { get; set; } public int Prop1 { get; set; } public int Prop2 { get; set; } public int Prop3 { get; set; } public int Prop4 { get; set; } public int Prop5 { get; set; } public int Prop6 { get; set; } public int Prop7 { get; set; } public int Prop8 { get; set; } public int Prop9 { get; set; } public int Prop10 { get; set; } public int Prop11 { get; set; }}Loaded Event Handler:
private void Window_Loaded(object sender, RoutedEventArgs e){ Random random = new Random(); List<Junk> list = new List<Junk>(); for (int index = 0; index < 50000; ++index) { list.Add(new Junk() { Prop0 = random.Next(), Prop1 = random.Next(), Prop2 = random.Next(), Prop3 = random.Next(), Prop4 = random.Next(), Prop5 = random.Next(), Prop6 = random.Next(), Prop7 = random.Next(), Prop8 = random.Next(), Prop9 = random.Next(), Prop10 = random.Next(), Prop11 = random.Next(), }); } DataContext = list;}