Files
esphome/tests/components/api
J. Nick Koston d731ddefc9 [core] Dispatch controller updates through generated direct calls
APIServer and WebServer inherited both Component and Controller, so each
on_*_update override reached through the registry needed a non-virtual
thunk to adjust this to the secondary base, and every publish iterated a
StaticVector of Controller pointers with an indirect call.

Drop the Controller base class and the runtime list. ControllerRegistry
only declares notify_*; code generation defines each one in main.cpp as
direct calls on the registered controllers through the entity_types.h
X-macro. A ControllerContract concept with a generated static_assert per
controller reports a missing callback clearly.

On an ESP32 IDF config with api, web_server and four entity types this
saves 256 B of flash and 24 B of RAM.
2026-09-24 16:55:18 +01:00
..