From 7aaa373bdf330c0cb8529b2946200f9e3f2ead4d Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Sat, 25 Apr 2026 17:12:17 +0200 Subject: [PATCH] revert: desktop image eviction threshold to 1.5GB --- lib/main.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index b5606a1d..e471f877 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -418,8 +418,8 @@ class _MainAppState extends State 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 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: