revert: desktop image eviction threshold to 1.5GB
This commit is contained in:
+6
-3
@@ -418,8 +418,8 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
|
||||
if (PlatformDetector.isDesktopOS()) {
|
||||
_memoryCheckTimer = Timer.periodic(const Duration(seconds: 30), (_) {
|
||||
final rss = ProcessInfo.currentRss;
|
||||
if (rss > 1024 * 1024 * 1024) {
|
||||
// 1GB
|
||||
if (rss > 1536 * 1024 * 1024) {
|
||||
// 1.5GB
|
||||
appLogger.w('RSS high ($rss bytes), evicting image caches');
|
||||
_evictImageCaches();
|
||||
}
|
||||
@@ -593,7 +593,10 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
|
||||
// SQLite WAL mode handles process death; desktop uses onExitRequested.
|
||||
InAppReviewService.instance.endSession();
|
||||
if (PlatformDetector.isDesktopOS()) {
|
||||
_evictImageCaches();
|
||||
if (ProcessInfo.currentRss > 1024 * 1024 * 1024) {
|
||||
// 1GB
|
||||
_evictImageCaches();
|
||||
}
|
||||
}
|
||||
case AppLifecycleState.inactive:
|
||||
case AppLifecycleState.hidden:
|
||||
|
||||
Reference in New Issue
Block a user