I have an Angular app which sometimes has large collections in the scope. This means the digest is sometimes very slow. I have 257 watches which I don't think is all that much. Rendering is done with React. This apparent unresponsiveness would be ok if I could indicate to the user that the app was busy.
I have tried to place a div centrally as the indicator and set this to happen using a $watch as described in the Angular docs: https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$watch
The trouble is there is a noticeable 2-3 second pause before anything seems to happen. After this pause the div is displayed, the digest completes and the React rendering runs which hides the div on completion. I can test this consistently by using a debounced text box bound to a model to cause a digest cycle. It seems as though when some intensive JS runs the browser forgets all attempts to update the window - I even see the animated gifs stop in this 2-3 second timeframe.
I've tested in Chrome and Firefox both on Windows 7 so far.
Is there a better way to show some kind of indicator to the user? Clearly I'm barking up the wrong tree here.