CHRISTOPANANJICKAL / fast_cached_network_image

A flutter package to cache network image fastly without native dependencies.
MIT License
29 stars 35 forks source link

Severe Performance Jank #30

Open GeylanKalafMohe opened 1 year ago

GeylanKalafMohe commented 1 year ago

When using this package I experience a Performance Jank (slow frame). It happens when I directly load an image when a new page is transitioned => The transition is stuttering due to the package. If I replace it by using Image.network this does not happen.

Kindly take a look at it.

ghost commented 1 year ago

Can you post a code snippet to reproduce this issue? @GeylanKalafMohe

GeylanKalafMohe commented 1 year ago

Can you post a code snippet to reproduce this issue? @GeylanKalafMohe

Just load an image with this library in screen 2 and try to push that screen from screen 1 via a button or anything. You will experience this issue. You can check the performance tab in the dev tools for more info.

CHRISTOPANANJICKAL commented 6 months ago

The DB operations must be done in an isolate in order to fix this issue i guess.

escamoteur commented 3 months ago

@GeylanKalafMohe I think a small repro project to really know how you are using it would be helpful. @CHRISTOPANANJICKAL not sure if an isolate would help in that case but it could be.

escamoteur commented 3 months ago

I just gave the package a try and it really has a problem if many images are requested. they appear in blocks and not when they are loaded. I think there is a reason why flutter_cache_manager uses a lot of Streams to decouple any blocking. Maybe a better approach than to build a fully new package would be to fork the flutter_cache_manager and give it a hive backend?

kiaxseventh commented 3 months ago

Yes, I can confirm that I also encountered the same problem. I replaced this package with the default Image.network in Flutter, and my issue was resolved.

GeylanKalafMohe commented 3 months ago

Yes, I can confirm that I also encountered the same problem.

I replaced this package with the default Image.network in Flutter, and my issue was resolved.

The default flutter widget does does support caching which is why we decided to use this package.

escamoteur commented 3 months ago

Have you tried cache_network_image? Am 18. Juni 2024, 19:59 +0100 schrieb Geylan Kalaf Mohe @.***>:

Yes, I can confirm that I also encountered the same problem. I replaced this package with the default Image.network in Flutter, and my issue was resolved. The default flutter widget does does support caching which is why we decided to use this package. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

GeylanKalafMohe commented 3 months ago

Have you tried cache_network_image?

Yes, I can confirm that I also encountered the same problem.

I replaced this package with the default Image.network in Flutter, and my issue was resolved.

The default flutter widget does does support caching which is why we decided to use this package.

Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you commented.Message ID: @.***>

Kindly share the link.

escamoteur commented 3 months ago

Sorry I misspelled I mean this one https://pub.dev/packages/cached_network_image Am 18. Juni 2024, 21:25 +0100 schrieb Geylan Kalaf Mohe @.***>:

Have you tried cache_network_image?

Yes, I can confirm that I also encountered the same problem. I replaced this package with the default Image.network in Flutter, and my issue was resolved. The default flutter widget does does support caching which is why we decided to use this package. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> Kindly share the link. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>