I just ran into the problem that I have to load a whole bunch of images in an Android application, so I wondered about the performance of parallel image loading and how many images can be loaded simultaneously. Therefore I wrote a small benchmark app that loads about 100 images (each between 4 and 7 KB) from a webpage. I admit, the app could be written better, but for my purpose it should be fine.
I measured the time in seconds that it took to load all images without displaying them in a View. 0 Threads means that all images were loaded in a sequence. A Thread count above 0 means that I created a new AsyncTask for each image and ran n of them at the same time.
Emulator Eclair 2.1
Eclair did well in the emulator between around 3 and 40 simultaneous downloads. It became pretty critical above 50 though. When i tried 100 downloads at the same time, it just stopped to work. The app did not crash, but the downloads seemed to stop completely and no progress was visible anymore.
Emulator Gingerbread 2.3
Interestingly, the emulator with Gingerbread did way worse then Eclair, but it was OK until around 30 parallel downloads. Gingerbread even had problems to create the AsyncTasks. Even when I tried 100 parallel downloads, I could never create and run more than 75 AsyncTasks at the same time. At least the app ran until the end, but the used time for 100 parallel downloads is just beyond the acceptable.
Nexus One Gingerbread 2.3.3 (T-Mobile)
Well, the difference from the emulator to my Nexus One was impressive. I got the best result with 20 simultaneous downloads in 7 seconds, but the whole range from 3 to 50 parallel downloads was fine and never over 11 seconds. I think that is a pretty good time.
At the end I would suggest not to go over around 20 or 30 simultaneous downloads. In that way it’s still tolerable in the emulator as well as on phones with slower download rates.
It would be interesting though to see similar performance tests with other phones and carriers.


Comments (0)