Icon cache holds all icons, icon list kept in RAM

With the 17 life_ patterns there are 66 icons, more than the 64 names the
cache held. It was cleared when full, so every pass over all icons (Icons
tab, page previews) read each one from LittleFS again: /api/icons took
6.5 s and blocked loop() all that time. The cache now holds 128 names and
forgets the missing names first. The sorted icon list is kept until an
icon is saved or deleted. /api/icons: 6.6 s -> 0.12 s.

Version 2.18.2, tested on the display over OTA.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-10-20 22:10:47 +02:00
1 parent 16b7856593
commit f5e77c7eca
2 files changed
+29 -5

No files matched your search

+1 -1
View File
@@ -118,7 +118,7 @@ const uint32_t SETUP_AP_DELAY = 20000; // open the AP when WiFi fails thi
const uint32_t WIFI_CONNECT_TIMEOUT = 30000;
const uint32_t WIFI_RESTART_TIME = 10UL * 60 * 1000;
#define FIRMWARE_VERSION "2.18.1"
#define FIRMWARE_VERSION "2.18.2"
// Home Assistant device id (do not change: Home Assistant's entities are linked to it)
const uint8_t HA_DEVICE_ID[] = {0x34, 0x86, 0x5d, 0x3a, 0x08, 0x28};