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.