Hi All,
Our game does a lot of PNG-GPU loading during startup, in these three common steps:
1) Load "image.png" from local system file into a byte array
2) Decode that PNG ByteArray into a BitmapData (via Loader.loadBytes)
3) Upload that (uncompressed image) BitmapData to the GPU
These 3 steps are asynchronous, so they do not affect the client’s FPS, which is great.
The problem is with step #2 - after many tests we found out that PNG decoding process is not paralleled by AIR on Android, and partially paralleled on iOS. Instead, multiple calls to ‘Loacder.loadBytes’ are queued and executed one by one.
For example if we decode 5 byte arrays containing the same data, and each one would normally take 500ms to decode, the entire process would take 2.5 seconds... and on iOS around 2 seconds.
This is really bad, because when a parallel process becomes serial - everything slows down...
Can anyone explain this? is it by design? a bug?
Thanks for your time,
Eyal