Page 1 of 1

Significantly more time when accessing encrypted littlefs

Posted: Fri May 01, 2026 5:26 am
by zliudr
I encrypted the littlefs partition that contains config and other files I read in during bootup. This has significantly increased the startup time from about 10 seconds to over a minute. Is this to be expected?

Maybe the way I created the file system was to be blamed? I am using MicroPython. It creates a littlefs file system upon first boot. I then copy files into the file system via Thonny. I wonder if this caused the files to be fragmented due to the nature of littlefs. Maybe there's a tool to generate non-fragmented littlefs partition? Thanks.

Re: Significantly more time when accessing encrypted littlefs

Posted: Wed May 06, 2026 3:29 pm
by zliudr
I'm a bit disappointed at the lack of response to my recent posts. I used to be able to get some responses on various topics.
Anyway, I tested encrypted fatfs. It is much faster, faster than unencrypted littlefs, albeit having no protection against corruption. Just in case someone else had a similar question, I created the littlefs binary using mklittlefs from github by giving it the file directory that contains the files. I imagine that will not cause significant fragmentation. I also tried drag-drop files using Thonny. No clear difference between speeds.

Re: Significantly more time when accessing encrypted littlefs

Posted: Tue May 12, 2026 9:15 am
by ESP_rrtandler
Hi @zliudr ,

When using the littlefs, the performance can be influenced by the available free space. You can try to change the size of the littlefs partition (incerease it) to figure out whether it helps the unencrypted performance.

You can also use the benchmark https://github.com/espressif/esp-idf/tr ... _benchmark
to evaluate the effect of other littlefs configurable options mentioned in the https://github.com/espressif/esp-idf/tr ... t-littlefs