mirror of
https://github.com/esphome/esphome.git
synced 2026-02-21 00:45:35 -07:00
bd0705cdc0fc94fe3d9ce9ba38f237d9a7d75e68
Reduces memory usage for YAML-defined API services by storing service names and argument names as pointers to string literals in flash instead of heap-allocated std::string objects. Implementation: - Created UserServiceBase<Ts...> for YAML services (const char* storage) - Created UserServiceDynamic<Ts...> for custom_api_device (std::string storage) - Updated CustomAPIDeviceService to inherit from UserServiceDynamic - UserServiceTrigger uses UserServiceBase (YAML-only) Memory savings per YAML service: - 0 args: 32 bytes (57% reduction) - 2 args: 48 bytes (60% reduction) - 5 args: 96 bytes (63% reduction) Custom API device services maintain same memory footprint (no regression). Typical ESPHome device (2-5 services): 100-240 bytes saved High-service device (10+ services): 400-800 bytes saved
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
400 MiB
Languages
C++
64.2%
Python
35.5%
C
0.2%
