Picasso, Glide, or Fresco
I made a test with loading ~100mb of images (32 individual bitmaps) from
/res/drawable-xxhdpi folder. I didn’t use
imageView.setImageResource cause it loads images synchronously and blocks the UI thread. Overall, it takes ~50 minutes on Galaxy S3 to load everything. So the results:
- Fresco loads images also synchronously. Probably, it uses imageView.setImageResource under the hood.
- Glide is better. But it’s prefetching algorithm is somewhat different from what I expect. It seems like I’m always scrolling an empty RecyclerView, instead of seeing images.
- Picasso worked the best:
- Async image loading
- Less amount of code.
- Similarly to Glide, there’re no non-standard UI components (in comparison with Fresco).
- Nice loading prioritisation. In Splash activity I start prefetching, then, after ~5 seconds, on my RecyclerView activity I’m loading images with a higher priority. Thus, a user can scroll the list smoothly, while the prefetching is being loaded in the background.
So, finally, I adjusted the caching size to ~80% of free mem. It allowed to cache everything. Everything! So it loads super smoothly, it works super smoothly and it takes almost no code.
Leave a Reply