title: How to put a delay on AngularJS instant search?
body: <p>I have a performance issue that I can't seem to address. I have an instant search but it's somewhat laggy, since it starts searching on each <code>keyup()</code>.</p>
  
  <p>JS:</p>
  
  <pre><code>var App = angular.module('App', []);
  
  App.controller('DisplayController', function($scope, $http) {
  $http.get('data.json').then(function(result){
      $scope.entries = result.data;
  });
  });
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;input id="searchText" type="search" placeholder="live search..." ng-model="searchText" /&gt;
  &lt;div class="entry" ng-repeat="entry in entries | filter:searchText"&gt;
  &lt;span&gt;{{entry.content}}&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The JSON data isn't even that large, 300KB only, I think what I need to accomplish is to put a delay of ~1 sec on the search to wait for the user to finish typing, instead of performing the action on each keystroke. AngularJS does this internally, and after reading docs and other topics on here I couldn't find a specific answer.</p>
  
  <p>I would appreciate any pointers on how I can delay the instant search.</p>