WevImages in LazyVStack in ScrollView locks at 100% CPU when setting containing view to .equatable()
When using this pattern:
ScrollView {
LazyVStack {
ItemView()
.equatable()
}
}
And ItemView contains a WebImage, the application will lock at 100% CPU and memory will keep climbing.
Being able to use equatable is important for performance optimization and preventing views from completely re-rendering when a @State variable changes that doesn't require the view to recalculate everything.
More information —
This doesn't happen in iOS 15 Beta 3, but it does happen in iOS 14.5.
I posted in this issue about it as well, https://github.com/SDWebImage/SDWebImageSwiftUI/issues/186
The TLDR of it is, try running in Release mode and see if you have the same issues. In my case, I only had the bad CPU framerate issues in debug. In release, smooth as butter, low CPU usage.