esp32_arduino_sqlite3_lib icon indicating copy to clipboard operation
esp32_arduino_sqlite3_lib copied to clipboard

sqlite3 database stored in Littlefs in esp32 s3 taking too much time in insert and update

Open ankitmittal1402 opened this issue 1 year ago • 7 comments

I am using an ESP32-S3 device and have created a .db file in the LittleFS partition for logging records. Initially, logging records is fast, but after around 1,000 records, it starts taking approximately 5 seconds to write a record. By the time it reaches 40,000 records, each write operation takes around 2 minutes.

My Configuration are:- Screenshot 2024-10-16 111737 And i am using custom partition and my partition is as follows:

Name Type SubType Offset Size

nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
app1, app, ota_1, 0x310000, 0x300000,
spiffs, data, spiffs, 0x610000, 0x9E0000,
coredump, data, coredump,0xFF0000, 0x10000,

And my littleFS details is: #define CONFIG_LITTLEFS_MAX_PARTITIONS 1 #define CONFIG_LITTLEFS_PAGE_SIZE 4096 #define CONFIG_LITTLEFS_OBJ_NAME_LEN 64 #define CONFIG_LITTLEFS_READ_SIZE 128 #define CONFIG_LITTLEFS_WRITE_SIZE 128 #define CONFIG_LITTLEFS_LOOKAHEAD_SIZE 256 #define CONFIG_LITTLEFS_CACHE_SIZE 512 #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 #define CONFIG_LITTLEFS_MALLOC_STRATEGY_DEFAULT 1 #define CONFIG_LITTLEFS_ASSERTS 1

ankitmittal1402 avatar Oct 16 '24 05:10 ankitmittal1402