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

KingfisherManager.retrieveImage() hits disk on main thread even when opted into all async options #2323

Open
3 tasks done
jotai-coder opened this issue Nov 20, 2024 · 0 comments

Comments

@jotai-coder
Copy link

Issue Description

KingfisherManager.retrieveImage() hits disk even when options are set to async

What

KingfisherManager.retrieveImage() hits disk on calling thread even when options are set to async when checking disk cache for presence of image. The issue with this is that KFImage() and image.kf.setImage() must be used on Main thread. This contributes to dropped frames. In UIKit, using KingfisherManager.retrieveImage manually (on a secondary thread), and then setting the image is simple workaround, but in SwiftUI it becomes more cumbersome.

Reproduce

v7.12
Use KFImage or kf.setImage in a large scrolling list. Observe hitches due to disk access on main
Screenshot 2024-11-20 at 11 44 41 AM
thread.

Other Comment

@jotai-coder jotai-coder changed the title KingfisherManager.retrieveImage() hits disk synchronously even when opted into all async options KingfisherManager.retrieveImage() hits disk on main thread even when opted into all async options Nov 21, 2024
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

1 participant