Does anyone out there know what image format results in the fastest loading speeds?
I haven’t done any checks, but if someone has, please comment.
I know that the android docs say that it supports: .JPG, .GIF, .PNG, .BMP, .WEBP.
Lets say that I have to load many images very quickly, which format should I use to get the best performance? I am already using low-res and hi-res images. Loading the low-res images is very fast, but if you scroll my screen very fast, sometimes it can’t quite keep up (there is a black section).
Also, does the method of loading matter? I’m currently using BitmapFactory.DecodeFile(path) as it is the easiest. I load the images asynchronously, so there is no ‘hiccup’ in the UI but we sometimes see black sections for a few milliseconds.
I know this also has to do with I/O speeds, but lets live in an ideal world where this speed is negligible.
My guess is, the bottleneck will be I/O speed, not CPU speed. Which means the most compressed format will be the fastest, even though it takes CPU time to decompress. So the answer is JPEG.