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
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.
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: www.pitanik.de/gcb
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)
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
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.
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.
Not that I have seen no 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% So donât sweat it
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)