- Home /
Atlas loading performance difference between Android and iOS?
We have a set of about 35 fairly large sprites (generally 2048 x 1024) in our application. Functionally all is fine. However, for iOS PVRTC compression this is an issue, since it needs square input.
We had the idea to have the sprite packer combine them in to nice square sprites that can be compressed. While unfortunately Unity doesn't seem to pack 2 such sprites into a nice square, we still got quite a significant benefit out of the compression (even when it essentially contains half a texture worth of unused pixels) and runtime performance improved significantly.
While not perfect, happy with at least some improvement there, we built an Android version. But unfortunately on that platform performance seems to have crawled to a halt. Where before performance for individual sprites was instant, loading them now takes seconds on a device like the Nexus 5.
Compression settings are ETC 4 bits in either Android scenario for most sprites. And RGBA32 for a handful of smaller sprites that do get nicely packed.
The iOS test device was an iPhone 4s, the lowest device we support.
The Android test device was a Nexus 5 running Android 5.1.1
Unity version is Unity 5.1.0p1
Is there any obvious difference regarding sprite packing (atlassing) between Android and iOS that could explain such a difference? Anything in particular I could look at?
I haven't experimented with ETC2 compressions yet, but I know ETC1 has several compressions ranging from Best (slowest loading, best quality) to Fast (fastest loading, lesser quality). ETC2 is only supported for OpenGL ES 3.0 devices, whether this is slower/faster than ETC1 and if other implications are brought forth, I'm not sure yet. These are the initial differences that I can think of between iOS and Android.
35 textures sized at 2048x1024 is a lot. RGBA32 tend to have huge filesizes as well. Loading all that in a few seconds seems reasonable. Perhaps you can get away with smaller resolutions and RGBA16.
I realize this comment doesn't answer your question, but hopefully it brings new insights and ideas to your problem.
The thing is, I'm not loading/using it all at the same time. Sure, atlassing would seem to imply that, but it's spread over multiple pages. And I would assume it's smart enough to not load all pages at once when it needs only one? I'll poke around a bit more to see if that is what is really happening and if that is even faster than I thought on iOS. Regarding ETC, I'm on ETC1. So unsupported ETC2 won't be the problem.
Thanks for the pointers though. $$anonymous$$uch appreciated.
Your answer
![](https://koobas.hobune.stream/wayback/20220613201253im_/https://answers.unity.com/themes/thub/images/avi.jpg)