How can I speed up image loading in imageview? I did the implementation through asynctask, in the stream itself the image is processed and output to imageview. but still there is a delay when displaying pictures. pictures themselves are in jpg format, the resolution is about 3000x3000. imageviews themselves are on the viewpager, that is, on each page of the new image and during fast scrolling there is a delay of about 2-3 seconds before the image is displayed. with small pictures such problems do not arise. I had the idea to remove the extra asynctask, which are not needed, that is, I need to load images only on 3 pages of the viewpager, but when scrolling quickly, asynctask accumulates for each page and naturally the application is slower. Any ideas on this?
1 answer
Do not reinvent the wheel and take the Universal Image Loader - all these issues are solved there.
- A good solution, but still can not keep up with the download pictures. But it loads at times faster than my implementation - makavelka
- @makavelka understand, better than this library, which is supported and includes, for example, LRU-cache in memory and on disk (read the memory card) with a decrease in the image through BitmapOptions and other spent things you still will not do. And what does not keep up: maybe your internet is weak? - DroidAlex
- It's not about the Internet, I read them from the memory card - makavelka
|