title: AngularJs Performance of Filter vs Filter inside Controller
body: <p>Like the title says, what is the best approach to filter a list of <code>ng-repeat</code>? To use a custom (or existing) <code>.filter()</code> or to create a custom filter function inside my controller?</p>
  
  <p>The reason why I'm asking it is because the <code>.filter()</code> is called multiple times (everytime there is a dygest cycle <a href="https://stackoverflow.com/questions/15646304/how-does-angularjs-watch-these-cases-in-an-ng-repeat/15646675#15646675">according to this answer</a>).</p>
  
  <p>So I'm concerned about performance issue. If I have a huge list to use inside the ng-repeat and need to filter it, isn't it going to take a huge impact when using <code>.filter()</code>? </p>
  
  <p>On the other hand, when using a custom filter function inside a controller I'll only filter the list when it's needed and only once. I have a better control over this part.</p>
  
  <p>Is this a correct logic? Or is there any other way to optimize the use of filters?</p>