Minimize memory usage by reducing in-memory cover cache size (mihonapp/mihon#2266)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> (cherry picked from commit 4c9cfd8da5f9c67daa4b6401a910f979fd79179f)
This commit is contained in:
parent
36c8f27736
commit
a5d8f2efac
2 changed files with 9 additions and 6 deletions
|
|
@ -11,6 +11,9 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
|
||||||
- `Other` - for technical stuff.
|
- `Other` - for technical stuff.
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
### Improved
|
||||||
|
- Minimize memory usage by reducing in-memory cover cache size ([@Lolle2000la](https://github.com/Lolle2000la)) ([#2266](https://github.com/mihonapp/mihon/pull/2266))
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Delegate Suwayomi tracker authentication to extension ([@cpiber](https://github.com/cpiber)) ([#2476](https://github.com/mihonapp/mihon/pull/2476))
|
- Delegate Suwayomi tracker authentication to extension ([@cpiber](https://github.com/cpiber)) ([#2476](https://github.com/mihonapp/mihon/pull/2476))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -269,12 +269,6 @@ class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.Factor
|
||||||
// SY <--
|
// SY <--
|
||||||
}
|
}
|
||||||
|
|
||||||
memoryCache(
|
|
||||||
MemoryCache.Builder()
|
|
||||||
.maxSizePercent(context, 0.25)
|
|
||||||
.build(),
|
|
||||||
)
|
|
||||||
|
|
||||||
diskCache(
|
diskCache(
|
||||||
DiskCache.Builder()
|
DiskCache.Builder()
|
||||||
.directory(context.cacheDir.resolve("image_cache"))
|
.directory(context.cacheDir.resolve("image_cache"))
|
||||||
|
|
@ -282,6 +276,12 @@ class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.Factor
|
||||||
.build(),
|
.build(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
memoryCache(
|
||||||
|
MemoryCache.Builder()
|
||||||
|
.maxSizePercent(context)
|
||||||
|
.build(),
|
||||||
|
)
|
||||||
|
|
||||||
crossfade((300 * this@App.animatorDurationScale).toInt())
|
crossfade((300 * this@App.animatorDurationScale).toInt())
|
||||||
allowRgb565(DeviceUtil.isLowRamDevice(this@App))
|
allowRgb565(DeviceUtil.isLowRamDevice(this@App))
|
||||||
if (networkPreferences.verboseLogging().get()) logger(DebugLogger())
|
if (networkPreferences.verboseLogging().get()) logger(DebugLogger())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue