-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long startup times #23
Comments
I am not the author of this package, and I have not even tried it yet :), but... Can you try unawaited instead of await? I imagine the package is indexing all images. 5 seconds seems too long though even for 400 images. |
I guess we need to do the DB operations in an isolated thread which can improve the performance to an extend |
Im planning to improve the performace issues in a future update. I'm waiting for some other packages to provide web support so that they can be used in this package. |
Like what package? |
I think we need use other way for cache procedures:
In case image was not downloaded form remote: 1 case will use network traffic There could be memory overflow problem if so many images stored in memory, solution can be limiting memory image count and using it as queue. Last thing is using key for identification because some url's can be temporary, otherwise url will be key. |
After adding ~400 images (in total around 1.5GB) of images app startup is long and takes about 5 seconds (there are no images displayed on the screen nor any images are loaded in cache. In fact nothing except
is being done with FastCachedImage library.
After wiping app data and cache everything returns to normal.
I expect to have even more images in cache (more than could possibly fit in ram) and I worry about the startup time and possible crashes. I didn't have that problems with cached_network_image package before.
The text was updated successfully, but these errors were encountered: