mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
Dashboard/Customization Buffer 16k, measure and and log size.
This commit is contained in:
@@ -200,7 +200,7 @@ void WebCustomizationService::devices(AsyncWebServerRequest * request) {
|
||||
// send back list of device entities
|
||||
void WebCustomizationService::device_entities(AsyncWebServerRequest * request, JsonVariant & json) {
|
||||
if (json.is<JsonObject>()) {
|
||||
auto * response = new MsgpackAsyncJsonResponse(true, EMSESP_JSON_SIZE_XXXLARGE_DYN);
|
||||
auto * response = new MsgpackAsyncJsonResponse(true, EMSESP_JSON_SIZE_XXLARGE_DYN);
|
||||
if (!response->getSize()) {
|
||||
delete response;
|
||||
response = new MsgpackAsyncJsonResponse(true, 256);
|
||||
@@ -215,7 +215,8 @@ void WebCustomizationService::device_entities(AsyncWebServerRequest * request, J
|
||||
JsonArray output = response->getRoot();
|
||||
emsdevice->generate_values_web_customization(output);
|
||||
#endif
|
||||
response->setLength();
|
||||
size_t length = response->setLength();
|
||||
EMSESP::logger().debug("Customization buffer used: %d", length);
|
||||
request->send(response);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user