mirror of
https://github.com/esphome/esphome.git
synced 2026-07-11 01:15:33 +00:00
f74c3c0489a27074d26cbcd41bf21e089e238db2
Split response_handler_ and process_uart_ into tiny inline wrappers in the header that short-circuit the common case, plus _slow_ bodies in the .cpp. - response_handler_: most loop() ticks have parsing_state_ outside the three SEND_* states; inline the range check and skip the call8 entirely. - process_uart_: most ticks have no UART bytes pending; inline an available() check and skip the out-of-line call + its stack frame. Inside the slow path, switch the while() to do/while() since the caller has already confirmed available() > 0. ESPHOME_ALWAYS_INLINE is required — with -Os gcc otherwise clones the wrapper into a shared \$isra\$ outline and keeps the call8. Measured on ESP32-S3 zwave-proxy-seeedw5500 build: idle-tick out-of-line calls in ZWaveProxy::loop() drop from 4 (response_handler_, api_is_connected, virtual parent_->is_connected, process_uart_ which nested available()) to 3 (api_is_connected, virtual is_connected, available).
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
549 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
