mirror of
https://github.com/esphome/esphome.git
synced 2026-03-01 10:24:19 -07:00
e9fee86c9d88f23e51efdb47159414ca2e8a18be
Replace the LogListener abstract class (single pure virtual method) with a lightweight LogCallback struct containing a function pointer + instance pointer. This eliminates a vtable sub-table and thunk from every class that previously inherited LogListener. Savings per former LogListener implementer: - 12 bytes vtable (sub-table header + thunk slot) - 4 bytes vtable (on_log in primary table) - ~23 bytes thunk code - ~39 bytes total per class Affected classes: APIServer, WebServer, MQTTClientComponent, Syslog, BLENUS, LoggerMessageTrigger (6 classes, ~234 bytes total). The non-capturing lambdas used at registration sites decay to plain function pointers at compile time -- zero closure/std::function overhead.
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
524 MiB
Languages
C++
64.1%
Python
35.5%
C
0.3%
