mttkay/ignition

RemoteImageView uses only disk cache

Opened this issue · 3 comments

I'm using the RemoteImageView multiple times inside of ListView. It's working properly, except that its a bit viscous / slow. It actually is acceptable, but I think it can be much more smooth. The log states constantly that the image is retrieved from the disk and sometimes from memory (1 of the 10 times). I think this is causing the scrolling to be slow as also mentioned in the documentation.

Currently I'm trying to figure out what is causing the RemoteImageView from not getting the image from memory. I tried to increase the buffer size but that is not working. I also tried to use the new Guava cache classes because the expiration method of the MapMaker is deprecated. Still no luck.

Do you have any idea to fix this?

I think so yes: by fixing issue #23.

The problem is that Dalvik eagerly clears soft references, so that the memory cache gets wiped frequently, and thus the hit rate is poor.

As for performance, you may also want to make sure to use a shared ImageLoader via setSharedImageLoader, or otherwise every RemoteImageView will instantiate its own loader. It's not a heavy object, but still.

Cool, thanks for the fast comment! I'll take a look at it.

Also thanks for the great library!

:)