-
Notifications
You must be signed in to change notification settings - Fork 636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compact WS data #1387
Compact WS data #1387
Conversation
I was distracted while doing the first merge. Quick testing 4d5c0d7 with Windows / Chrome and 16 switch rfbridge. Compared to this, it takes full 1-2 seconds for all of the rfb messages to come through. Also, notable comment from here: Links2004/arduinoWebSockets#187 (comment)
(which was referenced in #1300 by replacing module init code to send messages to the esp asking for each config part) |
Will force-push dev...mcspr:ws/optimize here to avoid doing merge + reduced buffer growth when using ws
ws/optimize branch now has an actually working buffered logger, but that still needs update to avoid duplicating messages when timestamping. |
* send all ws config at once on start * reduce ws json overhead by creating message buffer manually * use k:[values] instead of k1:value1, k2:value2 etc. for lists
* Simply print timestamp for supported destinations * Update ws destination to support 'prefix' sub-key * Avoid void casting in telnet module
I would argue that logging changes are related, but they can be split into a separate pr with ESPAsyncTCP / ESPAsyncWebServer versions update and general clean-up (like '\r' chars sent to ws when doing OTA and changes from ws/optimize to use application-level buffer for all the logging) Also, missing rfm69 wsOnSend. |
@xoseperez Generally, if you do not like approach at packing everything inside single ws message, there are two solutions for the ack problem at hand:
|
For #1367
Do not duplicate keys for relay, sensor, schedule, rfbridge, thingspeak & domoticz ws objects
Convert bool -> int (3 and 4 char shorter!) for status arrays
Minor edit _magnitudes.size() -> magnitudeCount()
Reuse single JsonObject for all callbacks