title: Angular repeat scope calculations
body: <p>Hi i'm building a form doing a lot of calculations, such as summarizing keys in objects</p>
  
  <pre><code>[
      { bar: 5, .. },
      { bar: 6, .. },
      ...
  ]
  </code></pre>
  
  <p>I use this expression in currently 35 places in my HTML. Sometimes connected to further calculations and with different keys</p>
  
  <pre><code>&lt;div&gt;
      {{ sumKeys('bar') + foobar }}
  &lt;/div&gt;
  </code></pre>
  
  <p>The function i use is declared as</p>
  
  <pre><code>app.controller('someCtrl', function($scope){
      $scope.sumKeys= function(key){
          return (calculated sum);
      }
  }
  </code></pre>
  
  <p>My problem is, that if i write a single letter into any input field the sum function is called about 400 times. I know there is a rule, that calls the function if a scope is changed up to 10 times, but isn't there a more efficient way?</p>
  
  <p>Can i output the result without changing the scope? Or force this calculation just to be done once? I know the results do not change any involved scope. So the results should be the same after 2 iterations.
  I also implemented the function as a filter with same results.</p>