I've been running down slow scroll performance and I've noticed that when I scroll and setImage gets called with non-cached images, the performance lags while the download happens.
if let imageURL = URL(string: presentable.imageUrl) {
let resource = ImageResource(downloadURL: imageURL)
photoView.kf.setImage(with: resource, options: [.transition(.fade(0.2))])
}
My understanding is that Kingfisher downloads these on a background thread and then displays them on the main thread but the main thread seems to be temporarily blocked. Removing the .transition doesn't help the situation.
Any ideas on how to improve my scroll performance? Thanks