title: Swapping data on ui-grid take a lot of time
body: <p>I have one grid and according to some conditions, I have to change the data which comes from the back-end.The first time I load data from the back the grid works fine. When I start switching data the grid displays new data well but stays frozen for a while. I notice that this time is random and is often about 3 seconds or plus.</p>
  
  <p>I tried to assign data to the grid through different ways but the result is the same:</p>
  
  <p>1) </p>
  
  <pre><code>$scope.gridOptions = {
        //some options,
        data: $scope.myData
  } 
  </code></pre>
  
  <p>And then</p>
  
  <p><code>Demande.query({lb: condition}, function (result) {
      $timeout(function () {$scope.myData = result;},0);// I also try without $timeout
  }</code></p>
  
  <p>2) I try to assign the data directly to the grid</p>
  
  <pre><code>Demande.query({lb: condition}, function (result) {
      $timeout(function () {$scope.gridOptions.data = result;},0);
  }
  </code></pre>
  
  <p>3) I combine the above approachs with </p>
  
  <p>a) <code>$scope.gridApi.core.notifyDataChange(uiGridConstants.dataChange.ROW)</code></p>
  
  <p>b)  <code>$scope.gridApi.core.refreshRows()</code></p>
  
  <p>but the problem persists. I am using angular-ui-grid 4.0.1</p>
  
  <p>Any idea will be appreciated. </p>