mirror of
https://github.com/esphome/esphome.git
synced 2026-09-14 08:38:39 +00:00
5ed6a2b285760624fab5f3ad577f2411442934d2
On ESP8266 (GCC 10.3), std::vector::push_back/emplace_back emit separate _M_realloc_insert functions even when called from only one site. Adding __attribute__((flatten)) inlines the realloc path, saving the out-of-line function overhead. Changes: - wifi: Move set_sta_priority from header to .cpp (eliminates duplicate instantiation at 2 call sites) and add flatten - web_server_base: Flatten add_handler (single push_back site) - api: Flatten accept_new_connections_ (single emplace_back site) - api: Extract push_item_ as single flattened push_back site for DeferredBatch (was 2 call sites in add_item/add_item_front) Saves ~200 bytes of flash on ESP8266, ~40 bytes on ESP32.
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
594 MiB
Languages
C++
55.8%
Python
43.6%
C
0.3%
JavaScript
0.2%
