I’m writing an Android game which uses an AsyncTask when the app starts to scale graphics and cut spritesheets into arrays of Bitmaps.
The problem is that the loading time at the start of the app does not seem to be consistant. When testing on my phone (HTC MyTouch/Magic) the loading time when I first launch the app after install is often around 0.5 seconds but sometimes takes up to around 2 seconds.
Is there any reason why this might be the case or is it unavoidable? Each time I’ve run the app it’s been under the same conditions, with no additional programs running in the background etc.
I can add the AsyncTask code if that might help.
Thanks for your help in advance.
There are a few possible reasons why this might be the case, and they are unavoidable. Here are two that pop to mind:
Also, do not forget that device CPU and flash speeds will vary themselves. While your device is, um, on the slow end, there may be some that are slower still, and there will be many that are faster.