mirror of
https://github.com/esphome/esphome.git
synced 2026-02-11 12:07:34 -07:00
cfbeea99831ec0d0abeb2e51157bba02db0d086d
Replace byte-at-a-time read_byte() calls with batched read_array() in loop(). Each read_byte() 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 loop iteration regardless of how many bytes are available. Also uses vector insert() for bulk append instead of per-byte push_back(), and caps reads to remaining buffer capacity upfront to avoid over-reading from UART.
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
600 MiB
Languages
C++
64.2%
Python
35.5%
C
0.2%
