mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
25762c62f8f78533b4bbe71d77d5122796e4bd17
Replace byte-at-a-time read() calls with batched read_array() in all four UART read sites: receive_telegram_(), receive_encrypted_telegram_(), and two drain loops. Each read() internally chains through read_array(data, 1) -> check_read_timeout_(1) -> available(), resulting in ~3 UART driver calls per byte. Batching into a 64-byte stack buffer reduces this to ~3 calls per batch regardless of byte count. Extract drain_rx_buffer_() helper to deduplicate the two drain sites in ready_to_request_data_() and stop_requesting_data_().
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
545 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
