diff --git a/lib/framework/StatefulService.h b/lib/framework/StatefulService.h index f7ed5f161..01943088d 100644 --- a/lib/framework/StatefulService.h +++ b/lib/framework/StatefulService.h @@ -14,7 +14,7 @@ #endif #ifndef FS_BUFFER_SIZE -#define FS_BUFFER_SIZE 4096 +#define FS_BUFFER_SIZE 8192 #endif enum class StateUpdateResult { diff --git a/lib_standalone/StatefulService.h b/lib_standalone/StatefulService.h index 807ce988e..4b9d8dea1 100644 --- a/lib_standalone/StatefulService.h +++ b/lib_standalone/StatefulService.h @@ -12,7 +12,7 @@ #endif #ifndef FS_BUFFER_SIZE -#define FS_BUFFER_SIZE 4096 +#define FS_BUFFER_SIZE 8192 #endif enum class StateUpdateResult { diff --git a/src/system.cpp b/src/system.cpp index 78e8d8e63..b9d687b53 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -940,7 +940,7 @@ void System::extractSettings(const char * filename, const char * section, JsonOb #ifndef EMSESP_STANDALONE File settingsFile = LittleFS.open(filename); if (settingsFile) { - DynamicJsonDocument jsonDocument = DynamicJsonDocument(EMSESP_JSON_SIZE_XLARGE_DYN); + DynamicJsonDocument jsonDocument = DynamicJsonDocument(FS_BUFFER_SIZE); DeserializationError error = deserializeJson(jsonDocument, settingsFile); if (error == DeserializationError::Ok && jsonDocument.is()) { JsonObject jsonObject = jsonDocument.as(); diff --git a/src/web/WebAPIService.cpp b/src/web/WebAPIService.cpp index 407e33fb2..73df7ee19 100644 --- a/src/web/WebAPIService.cpp +++ b/src/web/WebAPIService.cpp @@ -158,7 +158,7 @@ void WebAPIService::parse(AsyncWebServerRequest * request, JsonObject & input) { } void WebAPIService::getSettings(AsyncWebServerRequest * request) { - auto * response = new AsyncJsonResponse(false, EMSESP_JSON_SIZE_XLARGE_DYN); + auto * response = new AsyncJsonResponse(false, FS_BUFFER_SIZE); JsonObject root = response->getRoot(); root["type"] = "settings"; @@ -179,7 +179,7 @@ void WebAPIService::getSettings(AsyncWebServerRequest * request) { } void WebAPIService::getCustomizations(AsyncWebServerRequest * request) { - auto * response = new AsyncJsonResponse(false, EMSESP_JSON_SIZE_XLARGE_DYN); + auto * response = new AsyncJsonResponse(false, FS_BUFFER_SIZE); JsonObject root = response->getRoot(); root["type"] = "customizations";