I currently have a web socket based service which uses $rootScope.$apply to 
notify angular when a new response arrives.  This has proven to be very 
inefficient.  I know this is the document solution for async (out of digest 
cycle) events, however it's the resulting $rootScope.$digest is so 
expensive that it's become impractical.  For example I have very small 
messages indicating if a user is typing.  This updates a simple string in a 
very small scope in the UI.  However the digest cycle that results from it 
takes 18-40ms to complete.  In the case that many people are typing at the 
same time the CPU gets thrashed.

Can anyone offer an alternative to $rootScope.$apply?

-- 
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/d/optout.

Reply via email to