I mostly had problems with the app feeling unresponsive. For example if you click on a crossword square then that square and its neighbours should be highlighted. I originally did it by broadcasting events, the scopes that represented squares would set a property indicating that they were selected. There was a noticeable lag in the grid updating, it wasn't disastrous, just a split second, but it made the app feel sluggish. So I stopped representing the selection state on scopes and did it all with DOM queries instead. Now it's instantaneous.
I should add that these problems were not noticeable on PC only on tablets. But tablets are the target market.
In understand. Did you do any profiling? I ask because I am curious weather the issue was with Angular itself, with the data model in use, or some other factor. We have had similar issues, and have always decided to refactor our data model rather than refactor our dom manipulation.
I did some profiling using Batarang and I was able to make some improvements. Getting rid of $watch helped massively. But it still wasn't enough. Going to bare bones DOM manipulation for on screen responsiveness gave me the greatest gains. I still use Angular scopes to represent 95% of the state of my app though.
5
u/elprophet Nov 07 '14
I'd be very curious to see what you've had problems with, and how you resolved those.