2

I've spent the last two days trying to figure out why my app hangs when switching routes. This code is inherited from another developer.

I've put console.logs EVERYWHERE and it looks like everything finished with the route change, then it just hangs for like 10 seconds.

I decided to try using Chrome's dev tools to profile the code and I noticed 12 seconds or 30% of the processing time is spent on the xhr.onreadystatechange function.

The data being processed isn't that large (150kb to 200kb) and only about 3-4 xhr requests are being made (most of them are just a few kbs).

I'm not going to post the entire project, but I was wondering if I could have further advice for troubleshooting this issue. As is the chrome tools are very laggy and most of the tabs, including performance, in Batarang are unresponsive.

Sophie McCarrell
  • 2,831
  • 8
  • 31
  • 64
  • I have to post this somewhere. I have a counter that increments every second in my controller that i temporarily removed ALL references to. Still it refreshes all content on my controller and rebind all bind-once bindings every second. Angular is very headache inducing. – Sophie McCarrell Aug 12 '14 at 19:11
  • Ya, so I'm guessing no one knows the mystery behind what Angular is doing. Superb. I can't wait to be done with Angular and use a framework I can actually have control of. – Sophie McCarrell Aug 18 '14 at 15:40
  • Seeing the exact same problem myself, not sure what's going on but i'll let you know if I find somehting – Pim Aug 25 '14 at 16:05
  • Well just an FYI, but in the end I had to ditch Angular for our table and use handlebars =P I went pretty deep and still couldn't find a solution. A full week searching and building scopeless components, but in the end it was too hard to work around. – Sophie McCarrell Sep 09 '14 at 03:58

0 Answers0