Huge-Loading-Times Strikes Back 2 (the revenge of the Dragon)

Hello,

Ok, I’ve done absolutely everything I could to optimize any portion of suspiciously runtime consuming code, stripped all of my prefabs from unused objects, and reduced all my textures by an half (256x256).
But the Dragon has come back :confused:

Under Profiler, testing on Galaxy S, all of my scenes are spending a disastrous amount of time in these Unity routines :

  • Shader.CreateGPUProgram (from LoadObject) (50% of loading times)
  • Animation.RebuildInternalState (40% of my loading times)

Curiously, I’m managing tons of textures (nearly 50 at load times from a pool of 700+), but their loading only takes 5% of loading times.

So, can anybody lighten up my lantern ?

Additional info : There are 500 (very short, 0.2 to 1 sec) animationClips to load on average for each level.
But I’ve put Compression and Agressive KeyReduction on them. I’ve even optimized their loading by eliminating double loads (if char1 has common anims with char2, only load this anim once and AddClip() on both). In Editor, the level loading is taking 500 ms at most.
On Galaxy S, it’s up to 45 seconds.

:confused:

I filed a bug on this for my Samsung Epic 4G (Galaxy S variant) as well. It appears our phones are broken for some reason - other HTC devices don’t show this issue.

Ok, thank you :slight_smile:
On another hand, that’s kind of bad news, as Galaxy S and variants are one of the widest spread Android phones …

I can only give one advice. Try to set Automatic Compression to as many textures as possible. Which on Android platform means either Compressed ETC 4 bits or RGBA 16 bits depending on if texture has alpha or not. Setting any other texture compression drastically increases load times. Just mentioning although that it seems that textures loading isnt taking too much time for u anyway :slight_smile:

Thanks for the tip Fawad :slight_smile:
In fact I had to force every texture to either ETC or RGBA16, because any other format (PVRTC, DXT) would just crash the phone ^^

Ok some news :
I bought the iPhone 4s, tested Kinetic Damage on it, and loading times were simply 10 times faster for the same build. Something’s really odd.

comparing android to iOS will not work out as apple does a thing HTC fails to do pretty constantly: focus on optimizing the driver and release a few but highly optimized devices.
HTC on the other hand gives a damn about quality and tries to not drop out by pushing the quantity ie number of different devices each year.
HTC has released as many new handsets in 2011 as apple has in the whole iOS existance, with each new one from HTC getting worse and worse. Look at the widespread problems of HTC Sensation on network connectivity and call drop outs after 30s and alike.

For the android spaces it is starting to become clear that there is at the time 1 device maker worth supporting, thats samsung, soon it will be two and the second will be motorola once under googles direction and forced to comply to googles vision of android instead of repeating the xoom trashification
The rest simply does not get the fact that you can’t try to get and keep a hold in the smart phone market by using the ‘dump phone’ approach that made nokia big: flooding the market with many crappy supported devices

You’re absolutely right, but I thought 10 times was surreal, even with crappy drivers :expressionless:
(it’s really 10 times, and the tested device is a Samsung Galxy S, which is theorically not so slower than Apple A5 ^^)

Hi,I encountered the same problem, every time you create an object enters the scene, Shader.CreateGPUProgram occupy 70% of the time (45ms), and there are 42 Calls, you finally solved? Thank you to share

Does anybody fixed it ? have same issue

I notice the same problem here. Even with OSX as build target and testing in the Unity editor it is a performance killer.