Bookmarklet-Get-Watch-Count icon indicating copy to clipboard operation
Bookmarklet-Get-Watch-Count copied to clipboard

I count the number of active $watch() bindings in the current AngularJS page.

Bookmarklet: Counting Active $watch() Bindings In AngularJS

by Ben Nadel (on Google+)

The following is a bookmarklet that will count the number of $watch() bindings on the current page. Each $watch() binding represents processing overhead that AngularJS will have to execute during each $digest phase. By cutting down on the number of watchers, you can increase the performance of your AngularJS application.

Please grab bookmarklet from Demo page.

The bookmarklet uses document.querySelectorAll(), so it may not work in older browsers. That said, it does not depend on jQuery - only AngularJS.

Note: This is a spin-off of my blog post, Counting The Number Of Watchers In AngularJS. But, it has been modified to be more generic.