I’m happy to see that I am not the only one with this issue… I’ve been developing the app for months in the browser and everything works like a charm. Recently tried it on iOS and got the biggest disappointment of my life. Like people said here, working well on Android 5+, but it’s a total crap on iOS. I guess (and hope) it is because Angular 2 AND Ionic2 are both still in beta stage, and it will be good in the next months; Cause so far, Ionic1 is giving better performances so…
Usually the performance issues will not be very visible in pc browsers since they have access to more ram and cpu resources than your typical mobile device, however it’s worth mentioning that ios should run faster than android, also idk how would they compare with XWalk.
Hey everyone. Thanks so much for bringing this to our attention and sorry for the bad experience. We’re all hands on deck trying to figure out what’s going on here, and we have some leads that point to beta ng2 things (template compilation, etc.).
Hello all! Thanks for bringing this to our attention. After doing some profiling it seems that most of the delay seen in the above example (thanks @gerardx20 for the repo!) seems to stem from using an external template. From what I can see with chrome dev tools their is 323.27ms spent in xhr calls retrieving the html files for the templates. As an experiment I tried using inline templates instead for both the tabs file and the first tab page and noticed a very nice increase in both perceived and real performance. When profiling the app running with inline templates chrome dev tools shows that we are no longer waiting on long xhr calls and are able to immediately move into rendering the tabs page almost immediately after clicking the button to navigate. I have forked gerardx20’s repo and pushed a version with inline templates so that you all can test and see if you come to the same conclusions we have. Please feel free to test and comment with your findings. Thanks for using Ionic!
This is an isolated test case that demonstrates some order of magnitude overhead for template URLs currently. Can we apply that to a bigger app for more gains? That’s what we’re trying to test right now.
Also ng1 isn’t ng2.
If someone can try that test case above and let us know if converting the template urls to inline template strings helps the issue and that will give us a lead on where to go next.
I understand that ng1 isn’t ng2. ng2 doesn’t make ng-templates.js (with template cache), does it?
However iOS only have this problem, why do it work fine on Android?
Hm… I haven’t iPhone, so I checked my apps on iOS emulator (macbook pro 2015) and it works without the big delay. Actually I don’t see the deference between iOS and Android. Maybe because my apps isn’t big: 4 components, 7 pages and 2 modals ~ 14 html files.
Thanks for your response jgw96, I’ve tested your repo with an iPad mini 2, and indeed there’s an increase of speed.
In the original test with the iPad mini 2 takes between 2 to 3 seconds to change view, with the change in your repo the same iPad mini 2 is between 1 to 2 seconds, but still is noticeable compared to android.
I’ll be testing on iPhone 6s, and be posting results as soon as I get some free time.
I’ve uploaded an screencast with the new app, for compare purposes.
The original screencast link is in the repo.
Thanks for testing @gerardx20 ! Really appreciate it. Can’t wait to hear the results from your iPhone test. If you don’t mind me asking what device are you using for your Android testing?
Awesome to hear that. We’re going to switch the templates to inline in the starters in the meantime.
Also today we had the first successful integration of Angular 2’s new offline template compiling stuff which will render this entire issue moot. Templates will be pre-compiled into a more efficient format which will get us performance above what we have now, but also above Ionic 1 w/ angular 1. Then we will release the RC .