Dashboard/Customization Buffer 16k, measure and and log size.

This commit is contained in:
MichaelDvP
2022-12-22 21:27:59 +01:00
parent f66e7712c3
commit c1f39fbf57
2 changed files with 6 additions and 4 deletions

View File

@@ -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;
}