Created
December 2, 2013 16:09
-
-
Save octplane/7751877 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/vendor/angular/angular.js b/src/vendor/angular/angular.js | |
index d2115fe..e878eae 100644 | |
--- a/src/vendor/angular/angular.js | |
+++ b/src/vendor/angular/angular.js | |
@@ -8779,6 +8779,9 @@ function $RootScopeProvider(){ | |
logIdx, logMsg; | |
beginPhase('$digest'); | |
+ var ccount = 0; | |
+ console.time("$digest"); | |
+ | |
do { // "while dirty" loop | |
dirty = false; | |
@@ -8796,6 +8799,7 @@ function $RootScopeProvider(){ | |
if ((watchers = current.$$watchers)) { | |
// process our watches | |
length = watchers.length; | |
+ ccount += length; | |
while (length--) { | |
try { | |
watch = watchers[length]; | |
@@ -8842,6 +8846,8 @@ function $RootScopeProvider(){ | |
} | |
} while (dirty || asyncQueue.length); | |
+ console.timeEnd("$digest"); | |
+ console.log("%d watchers", ccount); | |
clearPhase(); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment