title: Knockout is slow when unchecking checkboxes on a large (1000) dataset
body: <p>I am using this code, to check all checkboxes on my view. </p>
  
  <pre><code>var checked = self.includeAllInSoundscript();
  var contents = self.filterContents(self.getFilters());
  for (var i = 0; i &lt; contents.length; i++) {
     contents[i].includeInSoundscript(checked);
  }
  return true;
  </code></pre>
  
  <p>The checkbox</p>
  
  <pre><code>&lt;input type="checkbox" data-bind="checked: includeInSoundscript" title="sometitle" /&gt;
  </code></pre>
  
  <p>This is what contents is: </p>
  
  <pre><code>(function (ko) {
  ContentViewModel = function (data) {
      this.orderId = data.orderId;
      this.contentReferenceId = ko.observable(data.contentReferenceId);
      this.includeInSoundscript = ko.observable();
  });
  </code></pre>
  
  <p>This is the filter methods: </p>
  
  <pre><code>self.getFilters = function() {
    var filterOrders = $.grep(self.orders(), function (order) {
      return (order.usedInfilter());
    });
    var filterLocations = $.grep(self.locations(), function (location)      {
      return (location.usedInfilter());
    });
    return { orders: filterOrders, locations: filterLocations };
  };
  self.filterContents = function (filter) {
    var filteredArray = self.contents();
    if (filter.orders.length &gt; 0) {
        filteredArray = $.grep(filteredArray, function (content) {
          return $.grep(filter.orders, function (order) {
            return (order.orderId == content.orderId);
          }).length &gt; 0;
        });
    }
    if (filter.locations.length &gt; 0) {
        filteredArray = $.grep(filteredArray, function (content) {
                           return $.grep(filter.locations, function (location) {
                             return $.inArray(location.location, content.orderedFrom().split('/')) != -1;
    }).length &gt; 0;
  });
  }
   return filteredArray;
  };
  </code></pre>
  
  <p>Checking all checkboxes is fast, but when i uncheck, it can take up to 20 seconds. Strange thing is when the filetered result is small, it still takes a bit longer, even if the filtered results is about 40, from a total set of 1000. </p>
  
  <p>The checkbox is in a table, bound using data-bind="foreach: contents"</p>
  
  <p>I have now removed some of the "unescessary" observables, for properties that most likely will not change, it then behaves slightly better, but still very slow, especially in firefox. The big question is, why is this behavior only on unchecking checkboxes, and not on filtering, sorting, checking, etc. </p>
  
  <p>Notice: Its only unchecking the checkboxes, basically when "checked" is false, otherwise its fast. </p>
  
  <p>Edit: I am only displaying 50 items at a time, but i am checking / unchecking all the filtered items. This, so that I have controll over what to post to the server. </p>