Please help me check the performance on Android & WinPhone - VEEERY SLOW

Dear community,

my ionic App is veeeery slow on Android and even slower on WinPhone - but on iOS the performance seems to be ok.
I have read a lot of topics on the low performance on Android problem - have there been any improvements?

I have tested the App on different devices and even the scrolling on normal content pages is slow.
Here is the Android apk
Here is the WinPhone xap

I am greatfull for any comment.

Curious - what Android and WinPhone hardware are you using and how does its hardware stack up to the iOS hardware that you’re testing on…

Also, so far as Android is concerned, have you tried introducing Crosswalk and comparing performance?

In any case, I would imagine that it will be easier to solicit assistance with some code snippits of the view and related logic that’s causing you the most pain.

WinPhone: lumia 520
Android: samsung galaxy s5
iOS: iPhone 3GS

So the iPhone is reaaaaally OLD and the other ones are not.
Regarding Crosswalk - no I haven’t worked with it yet, but it sounds interesting - can it really simulate performances of different phones?

The views are really simple - you can find the current version here:
I even had to activate the overflow-scroll="true" in the ion-content in order to increase ther performance on the winphone…

I can vouch for 3GS being extremely slow. We test on iPhone 4 & old android devices and there is a significant lag.

If all of your devices are 3-4 years old, you must understand that mobile browser rendering engines have only recently become significantly faster. The mobile browsers do not have the performance capabilities to provide a native-like feel.

Here are some other factors that may increase your performance regardless of the device type (that you may also want to check)

  1. Internet connectivity - test the speed + stability of your internet connection. Each view you transition to might be lagging because it’s waiting for the internet to return the components (images, views, etc) from the server
  2. Angular best performance practices. Check this doc for quick tips, + google ‘Angular Performance best practices’ for several more. Sometimes just a couple of quick changes can increase your performance by full seconds.
  3. Server-side performance tricks. You should really compress your files! & use minified versions. I’m not sure why your ionic.bundle.js is 1.8 mb. My minified version is less than 400kb. I have a pretty stable internet connection @ ~5-10mbps right now, and your page took 5 seconds to load on in-cognito. (see image attachment) This article was really useful for us.

Dear Sam1rm - thank you very much for your reply!!

The main problem I am facing is the actual usage of the app after it is loaded.
So things like

  • sliding the “slide menu”
  • scrolling
  • page transition

Page transitions have translateZ element, which means, that it’s GPU-supported and using the same Samsung galaxy s5 on websites with this kind of transitions I see no lag - but on my ionic app i do.
So yes, thanks for the note regarding the files (i definitely have to minimize it all) - these are big, but my main issues are after it’s loaded.
By the way - some time ago I have build a cordova app with my own written js-libs and it was fast, much faster and it also had page transitions like these.

So do you have any other idea what might be slowing down the performance (after the app is loaded) ?

Could you please tell me whether on your Android devices the app runs without lags? I’m talking about sliding the slidemenu, switching between sites and scrolling as such?

The amount of items that the browser has to manage can really cause issues. I’ve heard of some people having issues at 20 items and some at 1000 depending on the data and what is being rendered. How many items are you trying to load and do you have any background tasks?

If you’re using $watch anywhere, $timeout or $interval these can really impact performance if they’re looping or making large calls.

If you can make a blank template, place a list, and put your data in it, is it still slow or only in the full app? If it’s faster it might be something else in your code.

I am not using $watch(dogs) and there are no intervals (well almost none - the ones that are there are not important ).

The pages are almost blank - like the “programm” page - there are simple a couple of containers with some text and icons, and still the performance is horrible.
As sam1rm mentioned - my phones are old… yes, true, BUT - on the same phones, websites with similar slide effects work fine and without lagging…

The difference between those websites and the app though is that those slides are probably static and contained. The slides and lists in Ionic are VERY dynamic and give you the flexibility that native apps give. Though it is a decrease in performance, that’s the big trade off.

I would definitely look into crosswalk because if you’re not using any old plugins it should be a simple migration. It basically uses the chrome rendering engine instead of android’s default slow rendering engine. I’ve seen my apps go from stuttering to being butter smooth! Just make sure to do your back ups and research. It’s not too difficult as long as you follow the guides exactly.

Best of luck!

thank you very much - I will try to use crosswalk!

Is there something like crosswalk for windowsphone?

Not that I have seen no :frowning: Windows phone is difficult. If I can offer any advice: Don’t worry about windows phone. In december of last year it was at 2.8%, not to mention, most of those are windows 7 phones which are horrible to use no matter what. So you’re getting around a percent of phones if they even download and use your app.

I would focus more on android and iOS because your time is worth 98% of the market, not 2% :wink: So don’t sweat it :stuck_out_tongue:

:smiley: yeah, u’ve got a point there!!!

1 Like

Have you tried targeting Windows Phone 8.1 instead of 8.0?
There are native javascript apps in 8.1 which offer much better performance over the silverlight webview wrapper equivalent of 8.0. Might be a better option than disregarding Windows Phone completely.

To do this add the cordova platform called windows and you will get a Universal Windows app solution that will build for both phone and tablet versions of Windows 8.1 (Ionic works much better on this version as well)

Thank you!
Yeah, I’ve tried it on 8.1 and it still lags - even normal scrolling :frowning:

Even under an 8.1 javascript project? As opposed to a silverlight project?

I’ve had much more success that way.

hmm - sorry, I’ve overread that - no I haven’t - will try!