Question

I have made an app which works well on iOS but has performance problems on Android. I have noticed that on older devices such as galaxy s2 with a low screen resolution, the app is fine. It only lags on the new hd devices such as the galaxy s4 and nexus 4.

Are high screen resolutions causing the devices to lag? Does anyone know what I can do to find out how to fix this?

It's really strange because it's only on the new devices.

Was it helpful?

Solution

Not sure why it is happening on the S4 since it has a decent CPU and GPU, but high-density screens will cause lag, especially in Flash-based apps. I ran into the same problems when trying to move from the iPad 2 to the retina displays.

Let's look at it this way, with regards to the iPad issue I had. The iPad 3 bumped the resolution from 1024x768 to 2048x1536. That is 4x as many pixels. Traditionally, Flash has issues rendering vector images. It is good at it, among the best, but it is slow. So rendering a vector object on the iPad 2 was only a 40x40 area to update. On the iPad 3, it is a 160x160 area to update.

Quick tips:

  • Never use CPU rendering. Stick to Direct (or GPU if you need to, but you lose features with GPU rendering, such as filters)
  • Decrease the amount of vectors being used and how often you are changing them. You should avoid, at all costs, updating vector objects every frame.
  • Make sure you are testing a release build (In Flash Builders, Project->Export Release Build...) when testing framerate issues. It is generally much more evident on the iOS side than the Android side, but debug builds do cause lag
  • Don't set the framerate higher than you have to. As the framerate goes higher, each frame has less time to run the necessary calculations. The lag you notice isn't truly from low framerates (though that doesn't help), but more from dropped frames when a frame takes longer than available to render. 24 is the default, 30 is the standard. 60 is the max and is always nice, but it is completely unnecessary unless you are making a game.

I have several apps in production right now that run just fine on my Nexus 5, which is the same resolution as the S4 with roughly the same hardware, spec-wise. Unless there is a problem with that hardware specifically, you should be able to manage 30fps no problem, if not 60.

OTHER TIPS

use direct render mode it is recommended by adobe.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top