YYImage icon indicating copy to clipboard operation
YYImage copied to clipboard

CPU unusual usage issue when animate several same URL web images

Open bynil opened this issue 7 years ago • 1 comments

Demo: https://github.com/Bynil/YYImageIssueDemo

I use YYAnimatedImageView + YYWebImage to show WebP pictures, then the CPU utilization is up to 150+% on my iPhone 7.

It's normal (50+% usage) when load images by different URLs.

I tried to get some info from Time Profiler in Instruments, but end up with nothing.

instruments_shot_1 instruments_shot_2

简单地说就是同时从同一 URL 加载播放动图时 CPU 占用存在明显的异常,即使在 iPhone 7 上也会看起来卡顿。 我无法定位到问题原因,只能稳定复现,希望能探讨一下。

谢谢@ibireme 开源了这么好用的图片库。

bynil avatar Mar 21 '17 10:03 bynil

我试了你的demo,你使用的webp动图达到120帧,一般项目使用的50帧左右。我用sdwebimage按照你demo使用的方法加载,内存暴涨到500M。再不使用太大动图的情况下,yyimage是很有优势的。

yunzhongguyan avatar May 25 '17 06:05 yunzhongguyan