This question sounds like you are trying to fix the symptoms instead of the source. A watch doesn't trigger unless something causes it to.
Personally, I gained a performance boost when I rethought and recoded the way the way I used angular's built-in directives. For example, I had a ng-class pointing to a function on the scope. This function used other scope variables and some logic to determine what the appropriate class was to return. Hence, anytime any scope variable changed in the logic, this function was executing regardless whether it was ultimately affected. Instead, I had ng-class reference a primitive string on the scope and when something changed on the scope that I knew would affect it, only then did the primitive value get updated. In this way, I no longer had scope functions called every time and being on an ng-repeat, it made a significant difference. Lastly, if you need to truly want to unbind an element, this post has some good ideas: http://stackoverflow.com/questions/18240168/genuinely-stop-a-element-from-binding-unbind-an-element-angularjs On Monday, February 10, 2014 10:30:03 PM UTC-7, tonypee wrote: > > Just looking at ways to optimize my application. Has anyone been working > on ways to run partial digests? or to 'sleep' sections of your application. > > I like the idea of a bind-once style render, which can be updated on > demand. As i have a lot of data, (currently rendered and updated manually), > which i know when i want to update. > > Am i wrong that the current $digest processed all watches? and therefore > all templated values {{ like this }} ? > > Im thinking of working on a way to 'sleep' a tree of directives, unless > its already done? > > -- > Tony Polinelli > > -- 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.
