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

UICollectionView with WebP images is not smooth when scrolling. #80

Open
Bone-Song opened this issue Apr 18, 2024 · 1 comment
Open

Comments

@Bone-Song
Copy link

Hello.
UICollectionView with WebP images is not smooth when scrolling.
This issue was fine until version 1.5.1, but starting from version 1.5.2.

Please check the sample app I created.
-> https://github.com/Bone-Song/LibTest/tree/2b2f66ef8065855ac1e699ea3fb2a65f0b1b60fb/KingfisherWebPTest

Please let me know if there are any changes in using KingfisherWebP.
I hope solves this issue. thank you.

@yeatse
Copy link
Owner

yeatse commented Apr 18, 2024

In version 1.5.2, we revised the processing logic for animated images to accurately manage frames with varying durations, ensuring images are optimally displayed in AnimatedImageView for enhanced performance. You can find details in the release notes here: 1.5.2 - Progressive Animation.

After reviewing your sample app, I observed the performance drop you mentioned. I'll investigate into it later. For now as a workaround, you could improve the UI’s smoothness by replacing UIImageView with AnimatedImageView in your Main.storyboard, or changing callbackQueue to a global queue when setting images:

imageView?.kf.setImage(with: URL(string: urlStr), options: [.callbackQueue(.dispatch(.global()))]) { result in
    // debugPrint...
}

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