waynezxcv / Gallop

A framework for build smooth asynchronous iOS APP.
MIT License
746 stars 161 forks source link

内存会飙到很高 #34

Closed errorUserInfo closed 7 years ago

waynezxcv commented 7 years ago

由于网络图片部分依赖于SDWebImage。用Instruments测试发现,内存占用过大,是SDWebImage 的[UIImage decodedImageWithImage]方法对图片解压缓存造成的。如图 p 这里也有提到,https://github.com/rs/SDWebImage/issues/538 解决办法有: 1.减小图片分辨率 2.[[SDImageCache sharedImageCache] setShouldDecompressImages:NO]; [[SDWebImageDownloader sharedDownloader] setShouldDecompressImages:NO];设置为不解压图片 3.[[SDImageCache sharedImageCache] setMaxCacheSize:XXX];限制最大缓存大小。

waynezxcv commented 7 years ago

p 那个图片太小了 - -

errorUserInfo commented 7 years ago

嗯 谢啦

graceydb commented 6 years ago

setShouldDecompressImages:NO 没作用呢,4.3.3版本,加载尺寸大点的图片内存还是会暴涨