fresco icon indicating copy to clipboard operation
fresco copied to clipboard

about fresco memory

Open dongliang0108 opened this issue 11 years ago • 7 comments

I use fresco loaded network image by ListView, the network image is not compressed, so when I slide when large memory footprint, if what this page to slide the memory will take to around 200M, to how to solve this problem, thank you.

dongliang0108 avatar Aug 05 '15 01:08 dongliang0108

What are the dimensions of the image? What do you mean by "the network image is not compressed"? Are you loading animated images?

plamenko avatar Aug 05 '15 11:08 plamenko

I meet same problem,in my listview I load images ,one pic size is 1080*1080,I scroll and load many picture,the memory will around 200m ,the htc802 in Android4.2,memory will over 350m and oom!

nimengbo avatar Aug 06 '15 16:08 nimengbo

and A startActivity B ,B use fresco load image about 1080*1080 ,then finish B , do not in liferecyle ondestory , then startActivity B again and load image again , recycle this options , memory only add but not relase memory in Android 4.x

nimengbo avatar Aug 06 '15 16:08 nimengbo

Are you sure that you don't have multiple instances of activity B in memory?

plamenko avatar Aug 07 '15 15:08 plamenko

@plamenko My activityB launch mode is 'singleTask'

nimengbo avatar Aug 10 '15 02:08 nimengbo

@nimengbo, perhaps the best way of telling what happens is to take a heap dump when your memory usage gets suspiciously big and then analyze that. There are various ways to cause a memory leak, singleTask being used or not.

Please see: https://developer.android.com/tools/debugging/debugging-memory.html

plamenko avatar Aug 10 '15 11:08 plamenko

We strongly recommend against using uncompressed network images. Very large images can OOM; you should resize instead.

tyronen avatar Dec 11 '15 13:12 tyronen