I have a recycler view in my app with 300+ images in it and i am trying to improve it's performance. Should i use an image loading library for loading these images instead of just doing imageView.setImageResource(..)? Will that help?
Asked
Active
Viewed 221 times
0
-
there are method that can be more efficient than the naive implementation. Some of those methods are implemented in various libraries, such as fresco. The documentation of such libraries should tell you all about it. – njzk2 Jul 21 '18 at 06:24
-
The short answer is yes, you should. Even though internally, it's still using the equivalent of that method – OneCricketeer Jul 21 '18 at 07:55
3 Answers
0
There are several libraries available that can load images into ImageViews smoothly.
Glide is a great library with many image loading features. https://bumptech.github.io/glide/
Picasso is another library with similar features. http://square.github.io/picasso/
I wouldn't say one is better than the other, it is really just preference. They both get the job done efficiently.

kyle colquitt
- 86
- 5
-
Is Fresco similar to these? I noticed that for Fresco I'll need to change my ImageView to a different custom Fresco element instead. Is that the case with Picasso? on their page they are using "new SquareImageView" . Is this a custom element too? Is there any difference in performance? – Stelios Papamichail Jul 21 '18 at 09:14
0
Once use imageview.setImageResource() or imageView.setUrl()
And one time use glide instead.
Run your emulator and monitor your device ram or cpu usage in these 2 situations.
I personally only use glide for the images I retrieve from the web.
For the Images from local db or local storage default methods like imageView.setUrl or etc. work just fine.

Hessam-Emami
- 347
- 2
- 4
- 15