- Home /
Confusing Ipad performance problems - help!
Hey guys,
I have an iPhone app that works great, but I'm having problems getting an ipad-native version. Here's the issue:
In the process of trying to fix this issue, I've stripped my scene down to just the basics: one SpriteManager with about 64 sprites. All of my builds are being done on the same IPAD, no simulators or anything.
When I build the app with the target iPhone only (with the screen doubling because I'm running it on the ipad) it runs super smooth. However, if I build it for the ipad (and thus get the full resolution etc) it becomes much more choppy and sluggish.
When I run the unity profiler, here's what I get: iPhone (doubled screen) CPU-player> min: 2.1. Max:6.7. Avg: 4.0 Player-detail> ... render: 0.6 ...
Ipad native: CPU-player> min: 3.8. Max:88.1. Avg: 36.3 Player-detail> ... render: 31.9 ...
I realize that the larger screen resolution means more CPU usage, but not enough to explain this massive jump in render time. Is there anything I'm supposed to be doing on the ipad to avoid this?
Thanks in advance!! Ps everything is in os 3.2
Answer by ReJ · May 24, 2010 at 12:19 PM
Larger screen resolution actually does NOT mean more CPU usage. However high iPad resolution it has a tremendous cost on GPU (as you probably know iPad has exactly the same SGX535 GPU as iPhone3GS has, but x5 times more pixels).
In your case CPU just spends most of the time waiting until GPU finishes its work. You observe that as a high "render" time (31.9ms on average in your case) on iPad vs 0.6ms in case of iPhone.
Basically you should work on reducing amount of alpha-blended/alpha-tested surfaces and simplifying shaders: turn off fog (it can be really expensive on iPad), reduce number of textures per material (use only 1 if you can), prefer using shaders from iPhone Standard Assets package. Make sure all your textures are PVRTC compressed too.