Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoteImageView uses only disk cache #34

Open
BenGroot opened this issue Jul 26, 2012 · 3 comments
Open

RemoteImageView uses only disk cache #34

BenGroot opened this issue Jul 26, 2012 · 3 comments

Comments

@BenGroot
Copy link

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?

@mttkay
Copy link
Owner

mttkay commented Jul 26, 2012

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.

@BenGroot
Copy link
Author

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

Also thanks for the great library!

@mttkay
Copy link
Owner

mttkay commented Jul 26, 2012

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants