From cd8212fb531bee37aae7434004f238bac9df79e9 Mon Sep 17 00:00:00 2001 From: KakarottoCake Date: Sun, 5 Jul 2026 02:28:43 +0200 Subject: [PATCH] perf(tv): cap image cache at 64MB on TV TV boxes share limited RAM with 4K video decode buffers, so the 100MB phone budget crowds out the decoder. Low-RAM TVs already on the reduced tier keep the tighter 48MB cap. From #1479. --- lib/services/device_performance.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/services/device_performance.dart b/lib/services/device_performance.dart index 99fddde5..f30a8ec5 100644 --- a/lib/services/device_performance.dart +++ b/lib/services/device_performance.dart @@ -103,6 +103,10 @@ class DevicePerformance { } else if (isReduced) { cache.maximumSize = 400; cache.maximumSizeBytes = 48 << 20; // 48MB + } else if (PlatformDetector.isTV()) { + // TV boxes share limited RAM with 4K video decode buffers. + cache.maximumSize = 500; + cache.maximumSizeBytes = 64 << 20; // 64MB } else { cache.maximumSize = 800; cache.maximumSizeBytes = 100 << 20; // 100MB