immich
immich copied to clipboard
fix(mobile): Fixes memory image cache for local images
- Reduces number of "large" decoded images in memory from 100 down to 12. I was unable to reproduce the out-of-memory errors with this number of "large" images in the image cache and the performance was acceptable.
- Changes on device file cache from using a
ImageCacheManager
to a more genericCacheManager
because we don't need the additional complexity of image decoding in the cache.
Deploying immich with
Cloudflare Pages
Latest commit: |
d40d2a2
|
Status: | ✅ Deploy successful! |
Preview URL: | https://4d46105e.immich.pages.dev |
Branch Preview URL: | https://fix-mobile-image-cache-memor.immich.pages.dev |
The old version may have been working, honestly:
This is a fine rewrite of the complicated logic from before, but I don't think it's fixed the issue. I will keep this in draft until I find something more.
Thanks for this PR! It's better now, system (Samsung S20FE) still kills other apps, but Immich luckily survives.
Thanks for this PR! It's better now, system (Samsung S20FE) still kills other apps, but Immich luckily survives.
I think this is expected system behavior; high memory apps in the foreground are allowed to cause the system to close other apps. If this is unexpected, I'd be happy to look through some "best practices" or something from the app developer (Android / iOS) docs and see what types of things they recommend. There is still likely a memory leak, but I think this addresses the 99% case.