WPF DataGrid why is slow performance
<p>I have table which contains 70-90 rows and 9-15 columns. Loading of this taking 400 ms (without binding errors) in WPF and maybe 10 ms in WinForms. Why such a huge performance difference? (.NET 4.5). </p>

<pre><code>&lt;Grid Grid.Row="1" HorizontalAlignment="Stretch"
                   VerticalAlignment="Stretch"
                   Initialized="Grid_Initialized"
                   Loaded="Grid_Loaded"&gt;
  &lt;DataGrid ItemsSource="{Binding Gu45Documents}" 
            EnableColumnVirtualization="True" 
            AutoGenerateColumns="False" 
            EnableRowVirtualization="True" 
            VirtualizingPanel.IsVirtualizingWhenGrouping="True"
            IsReadOnly="True" 
            SelectedItem="{Binding SelectedItem}"&gt;
    &lt;DataGrid.Columns&gt;
      &lt;DataGridTextColumn Header="State"
                          Binding="{Binding DocState.State}"
                          Width="100"/&gt;
      &lt;DataGridTextColumn Header="StateDate"
                          Binding="{Binding DocState.StateDate}"
                          Width="100"/&gt;
      &lt;DataGridTextColumn Header="Esr_mount_name"
                          Binding="{Binding EGu45.Gu45.Esr_mount_name}"
                          Width="100"/&gt;
      &lt;DataGridTextColumn Header="Name"
                          Binding="{Binding EGu45.Gu45.Branch.Name}"
                          Width="100"/&gt;
      &lt;DataGridTextColumn Header="Delivery_time"
                          Binding="{Binding EGu45.Gu45.Delivery_time}"
                          Width="100"/&gt;
      &lt;DataGridTextColumn Header="Name"
                          Binding="{Binding EGu45.Gu45.Direction.Name}"
                          Width="100"/&gt;
      &lt;DataGridTextColumn Header="Esr_mount_name"
                          Binding="{Binding EGu45.Gu45.Esr_mount_name}"
                          Width="100"/&gt;
      &lt;DataGridTextColumn Header="Taking_time"
                          Binding="{Binding EGu45.Gu45.Taking_time}"
                          Width="100"/&gt;
      &lt;DataGridTextColumn Header="Delivery_time"
                          Binding="{Binding EGu45.Gu45.Delivery_time}"
                          Width="100"/&gt;
    &lt;/DataGrid.Columns&gt;
  &lt;/DataGrid&gt;
&lt;/Grid&gt;
</code></pre>

<p>Maybe it's better to use <code>WinForm</code> control in WPF? But it will break all MVVM model.</p>

<pre><code>&lt;WindowsFormsHost&gt;
  &lt;wf:DataGrid x:Name="dataGrid"/&gt;
&lt;/WindowsFormsHost&gt;
</code></pre>

<p>Maybe there exists some custom fast implementation of <code>DataGrid</code> in WPF?</p>

<p>All page look like </p>

<pre><code>&lt;UserControl x:Class="WPFGO.Gu45Register.View.Gu45ListView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:WPFGO.ShippingDocumentsRegister.CustomControls"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
             xmlns:Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Platform"
             xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
             mc:Ignorable="d" 
             DataContext="{Binding Source={StaticResource Locator}, Path=Gu45ListViewModel}"
             d:DesignHeight="300" d:DesignWidth="300"&gt;
    &lt;Grid Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Initialized="Grid_Initialized" Loaded="Grid_Loaded"&gt;
        &lt;DataGrid ItemsSource="{Binding Gu45Documents}" 
                      EnableColumnVirtualization="True" 
                      AutoGenerateColumns="False" 
                      EnableRowVirtualization="True" 
                      VirtualizingPanel.IsVirtualizingWhenGrouping="True"
                      IsReadOnly="True" 
                      SelectedItem="{Binding SelectedItem}"&gt;
            &lt;DataGrid.Columns&gt;
                &lt;DataGridTextColumn Header="State" Binding="{Binding DocState.State}" Width="100"/&gt;
                &lt;DataGridTextColumn Header="StateDate" Binding="{Binding DocState.StateDate}" Width="100"/&gt;
                &lt;DataGridTextColumn Header="Esr_mount_name" Binding="{Binding EGu45.Gu45.Esr_mount_name}" Width="100"/&gt;
                &lt;DataGridTextColumn Header="Name" Binding="{Binding EGu45.Gu45.Branch.Name}" Width="100"/&gt;
                &lt;DataGridTextColumn Header="Delivery_time" Binding="{Binding EGu45.Gu45.Delivery_time}" Width="100"/&gt;
                &lt;DataGridTextColumn Header="Name" Binding="{Binding EGu45.Gu45.Direction.Name}" Width="100"/&gt;
                &lt;DataGridTextColumn Header="Esr_mount_name" Binding="{Binding EGu45.Gu45.Esr_mount_name}" Width="100"/&gt;
                &lt;DataGridTextColumn Header="Taking_time" Binding="{Binding EGu45.Gu45.Taking_time}" Width="100"/&gt;
                &lt;DataGridTextColumn Header="Delivery_time" Binding="{Binding EGu45.Gu45.Delivery_time}" Width="100"/&gt;
            &lt;/DataGrid.Columns&gt;
        &lt;/DataGrid&gt;
    &lt;/Grid&gt;
&lt;/UserControl&gt;
</code></pre>