Hi everyone,
I’m using LVGL 9.4.0 with ESP-IDF 5.5.1 on an ESP32-P4-NANO, and I’m seeing a very large performance gap when displaying images depending on how LVGL accesses them.
I use
ESP32-P4-NANO
Waveshare display 800×1280
PSRAM enabled @ 200 MHz
Filesystem: SPIFFS
LVGL color depth: RGB565
No compression
Same image (800×1280), same format, same display code.
C-array image (compiled into firmware)
lv_image_set_src(img, &img_800x1280);
Displays in < 1 second
Binary image loaded via LVGL filesystem
lv_image_set_src(img, "A:/SPIFFS/img.bin");
Takes more than 10 seconds
Does anyone know why LVGL image loading from filesystem is so slow?
LVGL 9.4 ESP32-P4 Extremely slow image rendering from filesystem lv_image_set_src(img, "A:/SPIFFS/img.bin")
-
lbernstone
- Posts: 1132
- Joined: Mon Jul 22, 2019 3:20 pm
Re: LVGL 9.4 ESP32-P4 Extremely slow image rendering from filesystem lv_image_set_src(img, "A:/SPIFFS/img.bin")
Because the flash, vfs and filesystem (esp SPIFFS) are much slower about moving data than a memory mapped array.
You can likely speed things up quite a bit by caching the file from flash into psram, and then calling the lvgl function with the psram pointer. It's still my preference to inline file assets like that into the firmware as you have done, both for the performance increase and for easier maintenance when you update the firmware.
You can likely speed things up quite a bit by caching the file from flash into psram, and then calling the lvgl function with the psram pointer. It's still my preference to inline file assets like that into the firmware as you have done, both for the performance increase and for easier maintenance when you update the firmware.
Who is online
Users browsing this forum: Amazon [Bot], Bytespider, ChatGPT-User, Semrush [Bot] and 4 guests