mirror of
https://github.com/esphome/esphome.git
synced 2026-02-08 00:31:58 +00:00
seeed_mr_batch_read
Replace byte-at-a-time read_byte() calls with batched read_array() in all three Seeed MR sensor components. 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.
Description
Languages
C++
64.3%
Python
35.4%
C
0.2%
