lorenzofiamingo / swiftui-cached-async-image

CachedAsyncImage is the simplest way to add cache to your AsyncImage.
MIT License
595 stars 62 forks source link

Loading from cache slowing down animations #18

Open f3dm76 opened 2 years ago

f3dm76 commented 2 years ago

Hello @lorenzofiamingo, thank you for this great library! However when the image is really big, it seems like loading from cache slows down main UI thread. Could this operation be moved to background thread by any chance? When initially loading from server, navigation happens immediately and shows loading indicator, which looks good. But when it is already in cache, this is how the animation looks like. In any case have a beautiful day! https://user-images.githubusercontent.com/9447630/177713459-6e510665-a336-4b95-a173-f6a76a0445be.mp4

lorenzofiamingo commented 2 years ago

Hi @f3dm76! Designing the behavior of CachedAsyncImage I decided, for a cached Image, to load it as a normal Image would do with an image placed in local assets. If you put this big image in your assets and replace CachedAsyncImage with Image, does it work smoothly?

p.s. The linked video doesn't play.