You can turn your two $http requests to resolve in one promise: 
 
http://denisonluz.com/blog/index.php/2013/10/06/angularjs-returning-multiple-promises-at-once-with-q-all/

You need the digest cycle on the value of select changing to fire your 
$watch that fires the $http calls, so I can only see reducing this to two.  

Are you using Chrome plugin for AngularJS Batarang to help identify 
performance issues? 


On Sunday, February 23, 2014 12:59:40 PM UTC-7, Mark Volkmann wrote:
>
> I'm looking for ways to eliminate unnecessary digest cycles.
>
> I have a select element with an ng-model directive. Selecting from that 
> triggers a digest cycle. I use $scope.$watch on the same property that the 
> ng-model uses. When that fires, I initiate two $http.get calls, each of 
> which triggers another digest cycle when they resolve.
>
> I'd love to squash those from three digest cycles to one that runs after 
> both $http.get calls are resolved. Is there any way to do that?
>
> The only possibility I have thought of is to somehow turn off dirty 
> checking temporarily and when I'm ready, turn it back on and call 
> $rootScope.digest(). I haven't seen a way to turn off dirty checking though.
>
> -- 
> R. Mark Volkmann
> Object Computing, Inc. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to