mirror of
https://github.com/esphome/esphome.git
synced 2026-09-15 17:18:40 +00:00
ef29b18e18d520c49a60bf9ab911b9c36c21df0c
Move the notify_*_update() method definitions from controller_registry.cpp into controller_registry.h as inline functions. These are tiny loops over 1-2 controllers that each have a single call site in the entity's notify_frontend_() method. When defined in a separate TU, the compiler cannot inline them at the call site without LTO, resulting in an unnecessary function-call frame on every state publish. CodSpeed profiling of the CallbackManager container change (#15272) showed this extra frame accounting for ~12% regression in text sensor publish benchmarks. controller_registry.h is only ever included from .cpp files (never from other headers), so including controller.h after the class definition is safe and introduces no circular dependencies.
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
597 MiB
Languages
C++
55.8%
Python
43.6%
C
0.3%
JavaScript
0.2%
