I have an Angular SPA. I am running with the Angular Download Panel and AngularJS v1.4.9.
For some time, this happened so that after the application loaded, the panel got stuck after a while, indicating that not all requests were completed. In addition, one of the ones console.log()that I have in our code shoots continuously, about 1-2 times per second. The panel terminates and console.log works fine when the user reloads the page (but does not stop by itself).
console.log()is installed inside a function bound to a directive ng-disabled, so I know it as an indicator of a digest cycle.
I use Chrome as my browser, and recently I did profiling. Here are some screenshots from what I see:

This is a wide view. As shown here, first this happens at 100 ms, then at 400, then at 600, etc. (I performed 3 s).
This is the very first vertical strip. Not all of them look exactly like this, but the completeOutstandingRequest, timeout, and Browser.self.defer methods always exist. The searchDisable and log methods are ours, the log is the one I'm talking about above.
Here's another one for comparison, but it's a little different - it has another browser method: self.url. I'm not sure what he is doing.
Listed below are some issues that may be related:
Firefox
$browser.defer changeDetection zonejs
P.S. , , , - . , -, .
:
interceptor.$inject = ['$rootScope', '$q'];
function interceptor($rootScope, $q) {
return {
responseError: function (rejection) {
var config = rejection.config || {};
if (!config.ignoreAuthModule) {
switch (rejection.status) {
case 401:
var deferred = $q.defer();
$rootScope.$broadcast('event:auth-loginRequired', rejection);
return deferred.promise;
case 403:
$rootScope.$broadcast('event:auth-forbidden', rejection);
break;
}
}
return $q.reject(rejection);
}
};
}
$httpProvider.interceptors.push(interceptor);