-
Notifications
You must be signed in to change notification settings - Fork 187
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
Massive Memory Consumption #39
Comments
It's because AsyncImageView stores the decompressed images in memory, not the original compressed ones. Decompressed images consume width_height_4 bytes of RAM, so they're much larger than the original file size, but they are much quicker to draw on screen. I've added some logic to clear the cache if the memory runs out, so that should avoid any crashes due to the high memory consumption. I'll look at caching the uncompressed images as well in a future version so you don't need to re-download if the cache is cleared. |
Thanks for the clear explanation. I look forward to the update. Cheers, On Fri, Jan 3, 2014 at 3:12 PM, Nick Lockwood notifications@github.com
|
When using the Category with
imageView.imageURL = aNSURL;
, the memory consumption is insane. For a set of 500 images, of around 30-60Kb each, of JPEG format (flickr api, q sized), the memory consumption shoots up by a staggering 60-80Mb.These image views are subviews of UICollectionViewCells. So when scrolling, the previous images should be removed from the memory for the time being.
I've boiled down the issue to ImageIO not releasing the ImageIO_JPEG_DATA object.
Further google searches on this bit have shown that using
imageWithContentsOfFile
causes this a lot, but the category never uses it. The entire file doesn't. So I'm a little confused as to what may be causing this.I hope you get a chance to look into this at the earliest.
The text was updated successfully, but these errors were encountered: