Strange delays of the UI components

I’ve a couple of strange performance problems on Android.

  1. Sometimes the (click) event does not work at all or takes 2/3 seconds to open a new page via NavController.push().
  2. the LoaderController is completly lazy and random. It does not appear when i fire “present()” but it takes 2/3 seconds to show.
    Anybody have those same strange problems? It only affects the mobile phone. The emulator will always work.

I have experienced similar issues with Android. A few interesting points:

  1. The issue only happens with Android WebView 56 and 57. If I downgrade to the factory default 53 the loads are much faster.

  2. The issues go away when doing a release build ionic build android --prod --release but do occur if I only do ionic build --prod

1 Like
  1. that’s a nice suggestions! indeed i’ve problem with or without x-walk; i will try to force a x-walk version instead of messing up with the Zenfone2 default settings;

  2. nope; it affects prod version too; maybe i’ve to use the “promise” returned from present() to best sync all the stuff on this super-lagging device


Have you tried an actual --release build and not just --prod

yes, i tried everythin: no luck; i hope and suspect that is a problem related to only some specific model because other cheaper phone does not seems to be affected… or, they are just slow but not so “embarassing slow”. Perhaps Asus has messed too much with this phone?

We’re now having the same problem on iOS on an app that we released previous on RC4. It seems to have degraded - same experience, slow response to touch, delayed page push for no obvious reason. (Yes, we’ve done mountains of logging to investigate)… currently very frustrated,

1 Like

I tested on more devices using testers and meausered boot performance via GA. The problem is only with Zenfone2 and some other device. Some older device like a Nodis performs better almost as a Nexus 5. Really i’m unable to find a common element that is shared among the devices that are affected by this problem.

Do you have a code sample of this? Does it happen after you visit a page, go back, then visit the same page again?

Frustrated too. I’ve seen there is some commit that will upgrade the angular version that is used. Maybe this will solve it.

1 Like

The boot problem just happens with every application that has at least 10 components.
The UI problem usually happen only the 1st time you try to enter the page or try to use an item.
Reminds me of Windows 95’s UI stuck while memory is swapping to disk :stuck_out_tongue:

I’d guess then you have problems in your constructors. You should move any logic to the ionic view events and make absolutely sure you are writing good async code.

I don’t have any code in constructor. I think you misunderstood the point of the discussion.

Well it’s certainly possible. I took this:

to mean that any time you would navigate to a new page it took quite a while to appear. I then asked if it was faster on the second or third time because that’s indicative of slow code in a constructor. Ionic caches views, so the constructor will not run the second or third time you visit a page, so if your slowness cures itself on subsequent visits that’s often the culprit.

However, if that’s not the case here and you aren’t running any sort of logic in your view when it loads, something else is wrong. It might be worth trying switching the bootstrapping method for AoT compiling:!#bootstrap

Otherwise there’s just no real way to go any further without actual code. Or I misunderstood the discussion. I’d suggest using Chrome’s profiler to see what’s eating up the time.

Just tried ionic 2.2.0 that upgrade angular. I hoped for AOT doing better. Still problem.
From analytics data i restricted the problem to a couple of phone: including mine (ROFL) !
There is something wrong with the cordova webview of those phone (including Xwalk)… maybe something in the OS that interfere with angular? Or maybe them have just slow CPU/Memory??

I was thinking about a way to mitigate some stuff, for example not display a page before promise with the data have returned. Maybe i should use the “canEnter” callbacks?