flutter_cached_network_image icon indicating copy to clipboard operation
flutter_cached_network_image copied to clipboard

Performance issues with loading more images

Open stoneLee81 opened this issue 3 years ago • 6 comments

Whether it is possible to pause downloading or rendering pictures, when it is firm to the sliding interface?Loading too many large pictures on the web interface at a time will cause the interface to pause for 2-3 seconds, which will directly cause a crash on the tablet device

stoneLee81 avatar Dec 09 '21 14:12 stoneLee81

You should respect the template, otherwise you may never receive any help.

Crash is certainly a OOM issue, means you didn't use any memCache or try to load too large images. Secondly, if you load those within a listView or a listView.builder with automaticKeepAlive, the GC can't clean the image since they are still reference and will end up filling the memory.

Again, template and more details will help confirming this.

bounty1342 avatar Dec 12 '21 13:12 bounty1342

First thing, do not download big images to show in a small box, you should use thumb nails for listing and original image for details

Tonku avatar Dec 23 '21 11:12 Tonku

It feels that the performance is much worse than that of the native IOS / Android image loading framework, especially when a large number of images are loaded; Modifying the image cache size can only play a certain role; The root cause should be that the memory, network and disk suddenly increase due to concurrent loading, and the non visible view picture cache is not destroyed in time.

It is suggested to optimize from the aspects of multi-threaded concurrent loading, cache recycling, providing list rolling pause loading, etc. queue can be considered to smooth concurrent loading.

We also hope to provide a comprehensive scene performance pressure test report.

baneyue avatar Dec 27 '21 05:12 baneyue

Is image caching on web less effective due to the absence of a CacheInfoRepository? See: https://github.com/Baseflow/flutter_cache_manager/blob/develop/flutter_cache_manager/lib/src/config/config.dart#L20

britannio avatar Jan 11 '22 22:01 britannio

@baneyue, are you working on a fix for this ?

bounty1342 avatar Jan 26 '22 13:01 bounty1342

Im not sure if this is related but I have as well performance issues and did some analysis.

https://github.com/Baseflow/flutter_cached_network_image/issues/730

@baneyue @renefloor

Sesa1988 avatar May 07 '22 10:05 Sesa1988