SDWebImageSwiftUI
SDWebImageSwiftUI copied to clipboard
Memory usage in iOS 17
Hello,
We are running an app on iOS 17 with lots of images, and most of them are around 50K - 100K on disk. However, as you can see from the attached image, they are much larger in memory. In addition, SDWebImageSwiftUI does not appear to be releasing the memory as it once did. Has something been introduced that might have caused this other than iOS 17? It’s also worth noting that many of the images are either in a list or scroll view with a lazyvstack.
Thank you,
I think this is just the pre-render using the native UIKit method. If this does not match what you want ? You can disable this pre-force-decode feature via avoidDecodedImage to use decode just on time
See:
SDWebImageManager.shared.optionsProcessor = SDWebImageOptionsProcessor() { url, options, context in
// Disable Force Decoding in global, may reduce the frame rate
var mutableOptions = options
mutableOptions.insert(.avoidDecodeImage)
return SDWebImageOptionsResult(options: mutableOptions, context: context)
}