ayushsharma82 / ESP-DASH

Blazing fast library to create a functional dashboard for ESP8266 / ESP32
https://espdash.pro
GNU General Public License v3.0
976 stars 200 forks source link

Allow to send web socket data in batches that are less than the defined memory capacity for the buffer #190

Closed mathieucarbou closed 10 months ago

mathieucarbou commented 11 months ago

This fix allows ESP-DASH to correctly observe the DASH_PARTIAL_UPDATE_JSON_SIZE and DASH_LAYOUT_JSON_SIZE memory limites: when the addition of a new card entry increases the payload too much, the current json is flushed to web socket and a new one is created.

This allows to send a batch of messages instead of a big first one, which can easily goes into out of memory in case of many many cards.

Define DASH_DEBUG to see the payloads sent.

image

PR sent as draft because it requires a review / testing and generating oft he new UI.

mathieucarbou commented 10 months ago

Closing this PR as it requires UI changes.

I have the changes done in my forks, batching works fine with both ArduinoJson 6 and 7.

Closing this: this involves a UI change - I have it on my forks, let me know when you want it.

Ref: https://github.com/ayushsharma82/ESP-DASH/issues/194